Salome HOME
New item (FontItem), allowing to show information about font setting and to select...
[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 SUIT_DataOwnerPtrList& l );//!< copy constructor
41 #ifndef QT_NO_STL
42   SUIT_DataOwnerPtrList( const std::list<SUIT_DataOwnerPtr>& l );//!< copy constructor for STL list
43 #endif
44
45   iterator append      ( const SUIT_DataOwnerPtr& x );//!< append function
46
47 private:
48   // hide this methods: only append() should be used to add items to the list
49   iterator prepend( const SUIT_DataOwnerPtr& x );//!< hide method
50   iterator insert ( iterator it, const SUIT_DataOwnerPtr& x );//!< hide method
51   void push_front ( const SUIT_DataOwnerPtr& x );//!< hide method
52   void push_back  ( const SUIT_DataOwnerPtr& x );//!< hide method
53 };
54
55 #ifdef WIN32
56 #pragma warning( default:4275 )
57 #endif
58
59 #endif