Salome HOME
add necessary include <qpixmap.h>
[modules/gui.git] / src / SUIT / SUIT_DataObjectKey.h
1 #ifndef SUIT_DATAOBJECTKEY_H
2 #define SUIT_DATAOBJECTKEY_H
3
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
7
8 #include "SUIT.h"
9
10 class SUIT_EXPORT SUIT_DataObjectKey
11 {
12 public:
13   SUIT_DataObjectKey();
14   ~SUIT_DataObjectKey();
15
16   virtual bool isLess( const SUIT_DataObjectKey* ) const = 0;
17   virtual bool isEqual( const SUIT_DataObjectKey* ) const = 0;
18
19 private:
20   int     refCounter;
21
22   friend class SUIT_DataObjectKeyHandle;
23 };
24
25 class SUIT_EXPORT SUIT_DataObjectKeyHandle
26 {
27 public:
28   SUIT_DataObjectKeyHandle();
29   SUIT_DataObjectKeyHandle( SUIT_DataObjectKey* );
30   SUIT_DataObjectKeyHandle( const SUIT_DataObjectKeyHandle& );
31   ~SUIT_DataObjectKeyHandle();
32
33   void                      nullify();
34   bool                      isNull() const;
35   bool                      operator <( const SUIT_DataObjectKeyHandle& ) const;
36   bool                      operator ==( const SUIT_DataObjectKeyHandle& ) const;
37   SUIT_DataObjectKeyHandle& operator =( const SUIT_DataObjectKeyHandle& );
38
39 private:
40   void                      beginScope();
41   void                      endScope();
42
43 private:
44   SUIT_DataObjectKey*       myKey;
45 };
46
47 #endif