00001 #ifndef XDKWRL_SFBOOL_H
00002 #define XDKWRL_SFBOOL_H
00003
00004 #include <xdkwrl/config.h>
00005 #include <xdkwrl/fieldtypes.h>
00006 #include <iostream>
00007
00008 namespace wrl
00009 {
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 class XDKWRL_EXPORT SFBool
00020 {
00021 public:
00022 inline SFBool();
00023 inline SFBool(const bool b);
00024 inline SFBool& operator=(const bool b);
00025 inline SFBool& operator=(const SFBool b);
00026 inline operator bool() const;
00027 inline bool operator==(const SFBool& b);
00028 static inline const char* typeName();
00029 static inline FieldTypeId typeId();
00030 friend std::ostream& operator<<(std::ostream& s,const SFBool& f);
00031 protected:
00032 private:
00033 bool value_;
00034 };
00035
00036
00037
00038
00039
00040
00041 inline
00042 SFBool::SFBool()
00043 : value_(false)
00044 {
00045 }
00046
00047
00048
00049 inline
00050 SFBool::SFBool(const bool b)
00051 : value_(b)
00052 {
00053 }
00054 inline SFBool&
00055 SFBool::operator=(const bool b)
00056 {
00057 value_ = b;
00058 return *this;
00059 }
00060 inline SFBool&
00061 SFBool::operator=(const SFBool b)
00062 {
00063 value_ = b.value_;
00064 return *this;
00065 }
00066 inline
00067 SFBool::operator bool() const
00068 {
00069 return value_;
00070 }
00071 inline bool
00072 SFBool::operator==(const SFBool& b)
00073 {
00074 return value_ == b.value_;
00075 }
00076 inline const char*
00077 SFBool::typeName()
00078 {
00079 return "SFBool";
00080 }
00081 inline FieldTypeId
00082 SFBool::typeId()
00083 {
00084 return sfBool;
00085 }
00086 };
00087
00088 #endif // XDKWRL_SFBOOL_H