Home Hierarchy Members Alphabetical Related Pages

color.h

Go to the documentation of this file.
00001 #ifndef XDKWRL_COLOR_H
00002 #define XDKWRL_COLOR_H
00003 
00004 #include <xdkwrl/node.h>
00005 #include <xdkwrl/fieldtypes/mfcolor.h>
00006 
00007 namespace wrl
00008 {
00009   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00010   // Interface of Color
00011   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00012   class Color : public Node
00013   {
00014    public:
00015      Color(const char* name="");
00016      virtual ~Color();
00017      virtual inline unsigned int nbFields() const;
00018      virtual FieldHandle field(const std::string& n);
00019      virtual FieldHandle field(const unsigned int i);
00020      virtual bool isSetToDefaultValue(const unsigned int i) const;
00021      virtual inline unsigned int nbEventsIn() const;
00022      virtual EventInHandle eventIn(const std::string& n);
00023      virtual EventInHandle eventIn(const unsigned int i);
00024      virtual inline unsigned int nbEventsOut() const;
00025      virtual EventOutHandle eventOut(const std::string& n);
00026      virtual EventOutHandle eventOut(const unsigned int i);
00027      inline const char* typeName() const;
00028      virtual Node* duplicate() const;
00029      virtual Node* duplicate(std::map<const Node*,Node*>&) const;
00030      /*!@name Exposed Fields
00031       * A field that is capable of receiving events via an eventIn to 
00032       * change its value(s), and generating events via an eventOut 
00033       * when its value(s) change.
00034       */
00035       //!@{
00036       /*!
00037        * See <a href="#_details" class="md">Detailed Description</a>
00038        * for meaning of this field.
00039        * Default value is set to MFColor default value
00040        */
00041        MFColor    color;
00042      //!@}
00043      /*!@name Fields
00044       * A property or attribute of a node. Each node type has a fixed set
00045       * of fields. Fields may contain various kinds of data and one or many
00046       * values. Each field has a default value.
00047       */
00048       //!@{
00049      //!@}
00050      /*!@name Events In
00051       * 
00052       */
00053       //!@{
00054       /*!
00055        * Set event associated to exposedField color
00056        */
00057        EventIn<MFColor>    set_color;
00058   //!@}
00059      /*!@name Events Out
00060       * 
00061       */
00062       //!@{
00063       /*!
00064        * Changed event associated to exposedField color
00065        */
00066        EventOut<MFColor>    color_changed;
00067   //!@}
00068   };
00069 };
00070 //************************************************************
00071 // Implementation of Color
00072 //************************************************************
00073 /*!
00074  * Returns <code>"Color"</code>. Useful for printing.
00075  */
00076 inline const char*
00077 wrl::Color::typeName() const
00078 {
00079   return "Color";
00080 }
00081 /*!
00082  * Returns the number of fields (exposed or not) for this node type.
00083  */
00084 inline unsigned int
00085 wrl::Color::nbFields() const
00086 {
00087    return 1;
00088 }
00089 /*!
00090  * Returns the number of events in for this node type.
00091  */
00092 inline unsigned int
00093 wrl::Color::nbEventsIn() const
00094 {
00095    return 0;
00096 }
00097 /*!
00098  * Returns the number of events out for this node type.
00099  */
00100 inline unsigned int
00101 wrl::Color::nbEventsOut() const
00102 {
00103    return 0;
00104 }
00105 #endif // XDKWRL_COLOR_H
00106 
00107 // Local variables section.
00108 // This is only used by emacs!
00109 // Local Variables:
00110 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes")
00111 // End:

Generated on 24 Feb 2005 with doxygen version 1.3.9.1. Valid HTML 4.0! Valid CSS!