Changeset 300 for XMLIO_V2/dev/common/src/attribute.hpp
- Timestamp:
- 02/13/12 19:35:25 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/common/src/attribute.hpp
r219 r300 8 8 #include "xmlioserver_spl.hpp" 9 9 #include "object.hpp" 10 #include "base_type.hpp" 11 #include "message.hpp" 12 #include "buffer_in.hpp" 13 #include "buffer_out.hpp" 10 14 11 15 namespace xmlioserver … … 14 18 { 15 19 /// ////////////////////// Déclarations ////////////////////// /// 16 class CAttribute : public CObject 20 class CAttribute : public CObject, public CBaseType 17 21 { 18 22 typedef CObject SuperClass; … … 29 33 const boost::any & getAnyValue(void) const; 30 34 template <typename T> inline T getValue(void) const; 35 template <typename T> inline T* getRef(void); 31 36 32 37 /// Mutateurs /// … … 54 59 CAttribute(void); // Not implemented. 55 60 56 private :57 58 61 /// Propriété /// 59 62 boost::any value; … … 66 69 { 67 70 return (boost::any_cast<T>(this->value)); 71 } 72 73 template <typename T> 74 T* CAttribute::getRef(void) 75 { 76 return (boost::any_cast<T>(&value)); 68 77 } 69 78 … … 81 90 82 91 } // namespace tree 83 } // namespace xmlioserver 92 93 CMessage& operator<<(CMessage& msg,tree::CAttribute& type) ; 94 CMessage& operator<<(CMessage& msg, const tree::CAttribute& type) ; 95 96 CBufferOut& operator<<(CBufferOut& buffer,tree::CAttribute& type) ; 97 CBufferIn& operator>>(CBufferIn& buffer, tree::CAttribute& type) ; 98 } 99 // namespace xmlioserver 84 100 85 101 #endif // __XMLIO_CAttribute__
Note: See TracChangeset
for help on using the changeset viewer.