Home Hierarchy Members Alphabetical Related Pages

sfnode.h

Go to the documentation of this file.
00001 #ifndef XDKWRL_SFNODE_H
00002 #define XDKWRL_SFNODE_H
00003 
00004 #include <xdkwrl/config.h>
00005 #include <xdkwrl/fieldtypes.h>
00006 #include <iostream>
00007 
00008 namespace wrl
00009 {
00010   class Node;
00011   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00012   // Interface of SFNode
00013   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00014   /*! \ingroup fieldtypes
00015    *
00016    * Represents a pointer to a Node. Below is included the documentation for
00017    * this field type from the ISO standard.   
00018    * \htmlinclude sfnode.html
00019    */
00020   class XDKWRL_EXPORT SFNode 
00021   {
00022   public:
00023     inline SFNode();
00024     inline SFNode(Node* n);
00025     inline SFNode& operator=(Node* n);
00026     inline SFNode& operator=(const SFNode n);
00027     inline operator Node*() const;
00028     inline Node* node() const;
00029     inline Node* operator->() const;
00030     static inline const char* typeName();
00031     static inline FieldTypeId typeId();
00032     friend std::ostream& operator<<(std::ostream& s,const SFNode& f);
00033   protected:
00034   private:
00035     Node* value_;
00036   };
00037   //************************************************************
00038   // Implementation of SFNode
00039   //************************************************************
00040   inline
00041   SFNode::SFNode()
00042     : value_(NULL)
00043   {
00044   }
00045   inline
00046   SFNode::SFNode(Node* n)
00047     : value_(n)
00048   {
00049   }
00050   inline SFNode&
00051   SFNode::operator=(Node* n)
00052   {
00053     value_ = n;
00054     return *this;
00055   }
00056   inline SFNode&
00057   SFNode::operator=(const SFNode n)
00058   {
00059     value_ = n.value_;
00060     return *this;
00061   }
00062   inline
00063   SFNode::operator Node*() const
00064   {
00065     return value_;
00066   }
00067   inline Node*
00068   SFNode::node() const
00069   {
00070     return value_;
00071   }
00072   inline Node*
00073   SFNode::operator->() const
00074   {
00075     return value_;
00076   }
00077   inline const char*
00078   SFNode::typeName()
00079   {
00080     return "SFNode";
00081   }
00082   inline FieldTypeId
00083   SFNode::typeId()
00084   {
00085     return sfNode;
00086   }  
00087 };
00088 
00089 
00090 #endif // XDKWRL_SFNODE_H

Generated on 5 Jan 2007 with doxygen version 1.5.1. Valid HTML 4.0! Valid CSS!