Home | Hierarchy | Members | Alphabetical | Related Pages |
00001 #ifndef XDKWRL_ANCHOR_H 00002 #define XDKWRL_ANCHOR_H 00003 00004 #include <xdkwrl/node.h> 00005 #include <xdkwrl/fieldtypes/mfnode.h> 00006 #include <xdkwrl/fieldtypes/mfstring.h> 00007 #include <xdkwrl/fieldtypes/sfstring.h> 00008 #include <xdkwrl/fieldtypes/sfvec3f.h> 00009 00010 namespace wrl 00011 { 00012 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00013 // Interface of Anchor 00014 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00015 class Anchor : public Node 00016 { 00017 public: 00018 Anchor(const char* name=""); 00019 virtual ~Anchor(); 00020 virtual inline unsigned int nbFields() const; 00021 virtual FieldHandle field(const std::string& n); 00022 virtual FieldHandle field(const unsigned int i); 00023 virtual bool isSetToDefaultValue(const unsigned int i) const; 00024 virtual inline unsigned int nbEventsIn() const; 00025 virtual EventInHandle eventIn(const std::string& n); 00026 virtual EventInHandle eventIn(const unsigned int i); 00027 virtual inline unsigned int nbEventsOut() const; 00028 virtual EventOutHandle eventOut(const std::string& n); 00029 virtual EventOutHandle eventOut(const unsigned int i); 00030 inline const char* typeName() const; 00031 virtual Node* duplicate() const; 00032 virtual Node* duplicate(std::map<const Node*,Node*>&) const; 00033 /*!@name Exposed Fields 00034 * A field that is capable of receiving events via an eventIn to 00035 * change its value(s), and generating events via an eventOut 00036 * when its value(s) change. 00037 */ 00038 //!@{ 00039 /*! 00040 * See <a href="#_details" class="md">Detailed Description</a> 00041 * for meaning of this field. 00042 * Default value is set to MFNode default value 00043 */ 00044 MFNode children; 00045 /*! 00046 * See <a href="#_details" class="md">Detailed Description</a> 00047 * for meaning of this field. 00048 * Default value is set to 00049 \code 00050 description = string(""); 00051 \endcode 00052 */ 00053 SFString description; 00054 /*! 00055 * See <a href="#_details" class="md">Detailed Description</a> 00056 * for meaning of this field. 00057 * Default value is set to MFString default value 00058 */ 00059 MFString parameter; 00060 /*! 00061 * See <a href="#_details" class="md">Detailed Description</a> 00062 * for meaning of this field. 00063 * Default value is set to MFString default value 00064 */ 00065 MFString url; 00066 //!@} 00067 /*!@name Fields 00068 * A property or attribute of a node. Each node type has a fixed set 00069 * of fields. Fields may contain various kinds of data and one or many 00070 * values. Each field has a default value. 00071 */ 00072 //!@{ 00073 /*! 00074 * See <a href="#_details" class="md">Detailed Description</a> 00075 * for meaning of this field. 00076 * Default value is set to 00077 \code 00078 bboxCenter.setXYZ(0,0,0); 00079 \endcode 00080 */ 00081 SFVec3f bboxCenter; 00082 /*! 00083 * See <a href="#_details" class="md">Detailed Description</a> 00084 * for meaning of this field. 00085 * Default value is set to 00086 \code 00087 bboxSize.setXYZ(-1,-1,-1); 00088 \endcode 00089 */ 00090 SFVec3f bboxSize; 00091 //!@} 00092 /*!@name Events In 00093 * 00094 */ 00095 //!@{ 00096 /*! 00097 * See <a href="#_details" class="md">Detailed Description</a> 00098 * for meaning of this event. 00099 */ 00100 EventIn<MFNode> addChildren; 00101 /*! 00102 * See <a href="#_details" class="md">Detailed Description</a> 00103 * for meaning of this event. 00104 */ 00105 EventIn<MFNode> removeChildren; 00106 /*! 00107 * Set event associated to exposedField children 00108 */ 00109 EventIn<MFNode> set_children; 00110 /*! 00111 * Set event associated to exposedField description 00112 */ 00113 EventIn<SFString> set_description; 00114 /*! 00115 * Set event associated to exposedField parameter 00116 */ 00117 EventIn<MFString> set_parameter; 00118 /*! 00119 * Set event associated to exposedField url 00120 */ 00121 EventIn<MFString> set_url; 00122 //!@} 00123 /*!@name Events Out 00124 * 00125 */ 00126 //!@{ 00127 /*! 00128 * Changed event associated to exposedField children 00129 */ 00130 EventOut<MFNode> children_changed; 00131 /*! 00132 * Changed event associated to exposedField description 00133 */ 00134 EventOut<SFString> description_changed; 00135 /*! 00136 * Changed event associated to exposedField parameter 00137 */ 00138 EventOut<MFString> parameter_changed; 00139 /*! 00140 * Changed event associated to exposedField url 00141 */ 00142 EventOut<MFString> url_changed; 00143 //!@} 00144 }; 00145 }; 00146 //************************************************************ 00147 // Implementation of Anchor 00148 //************************************************************ 00149 /*! 00150 * Returns <code>"Anchor"</code>. Useful for printing. 00151 */ 00152 inline const char* 00153 wrl::Anchor::typeName() const 00154 { 00155 return "Anchor"; 00156 } 00157 /*! 00158 * Returns the number of fields (exposed or not) for this node type. 00159 */ 00160 inline unsigned int 00161 wrl::Anchor::nbFields() const 00162 { 00163 return 6; 00164 } 00165 /*! 00166 * Returns the number of events in for this node type. 00167 */ 00168 inline unsigned int 00169 wrl::Anchor::nbEventsIn() const 00170 { 00171 return 2; 00172 } 00173 /*! 00174 * Returns the number of events out for this node type. 00175 */ 00176 inline unsigned int 00177 wrl::Anchor::nbEventsOut() const 00178 { 00179 return 0; 00180 } 00181 #endif // XDKWRL_ANCHOR_H 00182 00183 // Local variables section. 00184 // This is only used by emacs! 00185 // Local Variables: 00186 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes") 00187 // End:
Generated on 24 Feb 2005 with version 1.3.9.1. |