X3DRoute.h

Go to the documentation of this file.
00001 #ifndef X3DROUTE_H
00002 #define X3DROUTE_H
00003 
00004 #include "X3DMemberFunctor.h"
00005 
00006 #include <vector>
00007 
00008 namespace X3DTK {
00009 namespace X3D {
00010 
00011 class Scene;
00012 
00013 }
00014 
00015 class X3DRoute;
00016 typedef X3DRoute *SFRoute;
00017 typedef std::vector<X3DRoute *> MFRoute;
00018 
00019 class X3DRoute 
00020 {
00021 public:
00022   static X3DRoute *create(X3DAbstractNode *A, const SFString &a_name, X3DAbstractNode *B, const SFString &b_name);
00023   inline void send() {_b->setValueOf(_B, _a->getValueOf(_A));};
00024   static bool remove(X3DRoute *route);
00025   
00027   inline X3DAbstractNode *getFromNode() const {return _A;};
00029   inline const SFString &getFromField() const {return _fromField;};
00031   inline X3DAbstractNode *getToNode() const {return _B;};
00033   inline const SFString &getToField() const {return _toField;};
00035   static void loadScene(X3D::Scene *S, const MFRoute &routes);
00036   
00037 private:
00038   X3DRoute(X3DAbstractNode *A, const SFString &fromField, X3DMemberFunctor *a, X3DAbstractNode *B, const SFString &toField, X3DMemberFunctor *b);
00039   ~X3DRoute();
00040    
00041   X3DAbstractNode *_A;
00042   SFString _fromField;
00043   X3DMemberFunctor *_a;
00044   X3DAbstractNode *_B;
00045   SFString _toField;
00046   X3DMemberFunctor *_b;  
00047   
00048   static MFRoute _routes;
00049 };
00050 
00051 }
00052 
00053 #endif

Generated on Fri Jul 30 12:02:30 2004 for X3DToolKit by doxygen 1.3.6