1 #include "SUIT_DataObjectKey.h"
7 #define _typeinfo std::type_info
10 #define _typeinfo type_info
14 Class: SUIT_DataObjectKey
15 Descr: Key for personal idetfication of SUIT_DataObject.
18 SUIT_DataObjectKey::SUIT_DataObjectKey()
23 SUIT_DataObjectKey::~SUIT_DataObjectKey()
28 Class: SUIT_DataObjectKeyHandle
29 Descr: Wrapper around the pointer of class SUIT_DataObjectKey.
32 SUIT_DataObjectKeyHandle::SUIT_DataObjectKeyHandle()
37 SUIT_DataObjectKeyHandle::SUIT_DataObjectKeyHandle( const SUIT_DataObjectKeyHandle& other )
38 : myKey( other.myKey )
45 SUIT_DataObjectKeyHandle::SUIT_DataObjectKeyHandle( SUIT_DataObjectKey* key )
51 SUIT_DataObjectKeyHandle::~SUIT_DataObjectKeyHandle()
56 bool SUIT_DataObjectKeyHandle::isNull() const
61 void SUIT_DataObjectKeyHandle::nullify()
66 bool SUIT_DataObjectKeyHandle::operator<( const SUIT_DataObjectKeyHandle& kw ) const
68 if ( myKey == kw.myKey )
71 if ( !myKey || !kw.myKey )
72 return myKey < kw.myKey;
74 const _typeinfo& i1 = typeid( *myKey );
75 const _typeinfo& i2 = typeid( *kw.myKey );
77 int cmp = strcmp( i1.name(), i2.name() );
83 return myKey->isLess( kw.myKey );
86 bool SUIT_DataObjectKeyHandle::operator==( const SUIT_DataObjectKeyHandle& kw ) const
88 if ( myKey == kw.myKey )
91 if ( !myKey || !kw.myKey )
94 if ( typeid( *myKey ) != typeid( *kw.myKey ) )
97 return myKey->isEqual( kw.myKey );
100 SUIT_DataObjectKeyHandle& SUIT_DataObjectKeyHandle::operator=( const SUIT_DataObjectKeyHandle& kw )
102 if ( myKey != kw.myKey )
113 void SUIT_DataObjectKeyHandle::beginScope()
119 void SUIT_DataObjectKeyHandle::endScope()
126 if ( !myKey->refCounter )