]> SALOME platform Git repositories - modules/gui.git/blob - src/SUIT/SUIT_DataOwner.h
Salome HOME
ffff7fe9f91150b7de8748ac094768fde3cc4f40
[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();//!< constructor
16   virtual ~SUIT_DataOwner();//!< destructor
17   //! compare function
18   virtual bool isEqual( const SUIT_DataOwner& ) const = 0;
19 };
20
21 /*! \typedef SUIT_DataOwnerPtr
22  * Define smart pointer for SUIT_DataOwner object
23  */
24 typedef SMART(SUIT_DataOwner) SUIT_DataOwnerPtr;
25
26 /*! Comparing two SUIT_DataOwnerPtr objects.*/
27 bool operator==( const SUIT_DataOwnerPtr&, const SUIT_DataOwnerPtr& );
28
29 /*! \class QValueList
30  *  \brief For more documentation see <a href="http://doc.trolltech.com">QT documentation</a>.
31  * QT class
32  */
33 /*! \class SUIT_DataOwnerPtrList
34  * \brief Manage list of SUIT_DataOwnerPtr.
35  */
36 class SUIT_EXPORT SUIT_DataOwnerPtrList : public QValueList<SUIT_DataOwnerPtr> 
37 {
38 public:
39   SUIT_DataOwnerPtrList();                         //!< constructor
40   SUIT_DataOwnerPtrList( const bool skipAllEqual );//!< constructor
41   SUIT_DataOwnerPtrList( const SUIT_DataOwnerPtrList& l );                         //!< copy constructor
42   SUIT_DataOwnerPtrList( const SUIT_DataOwnerPtrList& l, const bool skipAllEqual );//!< copy constructor
43 #ifndef QT_NO_STL
44   SUIT_DataOwnerPtrList( const std::list<SUIT_DataOwnerPtr>& l );                         //!< copy constructor for STL list
45   SUIT_DataOwnerPtrList( const std::list<SUIT_DataOwnerPtr>& l, const bool skipAllEqual );//!< copy constructor for STL list
46 #endif
47
48   iterator append      ( const SUIT_DataOwnerPtr& x );//!< append function
49
50 private:
51   // hide this methods: only append() should be used to add items to the list
52   iterator prepend( const SUIT_DataOwnerPtr& x );//!< hide method
53   iterator insert ( iterator it, const SUIT_DataOwnerPtr& x );//!< hide method
54   void push_front ( const SUIT_DataOwnerPtr& x );//!< hide method
55   void push_back  ( const SUIT_DataOwnerPtr& x );//!< hide method
56 private:
57   bool mySkipEqual;
58 };
59
60 #ifdef WIN32
61 #pragma warning( default:4275 )
62 #endif
63
64 #endif