Salome HOME
Fix for Bug IPAL8957(3.0.0: GEOM local selections don't work in OCC viewer).
[modules/gui.git] / src / SUIT / SUIT_DataOwner.h
1 #ifndef SUIT_DATAOWNER_H
2 #define SUIT_DATAOWNER_H
3
4 #include "SUIT_SmartPtr.h"
5
6 #include <qvaluelist.h>
7
8 #ifdef WIN32
9 #pragma warning( disable:4275 )
10 #endif
11
12 class SUIT_EXPORT SUIT_DataOwner : public RefCount 
13 {
14 public:
15   SUIT_DataOwner();
16   virtual ~SUIT_DataOwner();
17
18   virtual bool isEqual( const SUIT_DataOwner& ) const = 0;            
19 };
20
21 typedef SMART(SUIT_DataOwner) SUIT_DataOwnerPtr;
22
23 bool operator==( const SUIT_DataOwnerPtr&, const SUIT_DataOwnerPtr& );
24
25 class SUIT_EXPORT SUIT_DataOwnerPtrList : public QValueList<SUIT_DataOwnerPtr> 
26 {
27 public:
28   SUIT_DataOwnerPtrList();
29   SUIT_DataOwnerPtrList( const SUIT_DataOwnerPtrList& l );
30 #ifndef QT_NO_STL
31   SUIT_DataOwnerPtrList( const std::list<SUIT_DataOwnerPtr>& l );
32 #endif
33
34   iterator append      ( const SUIT_DataOwnerPtr& x );
35
36 private:
37   // hide this methods: only append() should be used to add items to the list
38   iterator prepend( const SUIT_DataOwnerPtr& x );
39   iterator insert ( iterator it, const SUIT_DataOwnerPtr& x );
40   void push_front ( const SUIT_DataOwnerPtr& x );
41   void push_back  ( const SUIT_DataOwnerPtr& x );
42 };
43
44 #ifdef WIN32
45 #pragma warning( default:4275 )
46 #endif
47
48 #endif