Salome HOME
uninitialized field in SUIT_DataOwnerPtrList
[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( const bool skipAllEqal = true );//!< constructor
40   SUIT_DataOwnerPtrList( const SUIT_DataOwnerPtrList& l );//!< copy constructor
41   SUIT_DataOwnerPtrList( const SUIT_DataOwnerPtrList& l, const bool skipAllEqal );//!< copy constructor
42 #ifndef QT_NO_STL
43   SUIT_DataOwnerPtrList( const std::list<SUIT_DataOwnerPtr>& l );//!< copy constructor for STL list
44   SUIT_DataOwnerPtrList( const std::list<SUIT_DataOwnerPtr>& l, const bool skipAllEqal );//!< copy constructor for STL list
45 #endif
46
47   iterator append      ( const SUIT_DataOwnerPtr& x );//!< append function
48
49 private:
50   // hide this methods: only append() should be used to add items to the list
51   iterator prepend( const SUIT_DataOwnerPtr& x );//!< hide method
52   iterator insert ( iterator it, const SUIT_DataOwnerPtr& x );//!< hide method
53   void push_front ( const SUIT_DataOwnerPtr& x );//!< hide method
54   void push_back  ( const SUIT_DataOwnerPtr& x );//!< hide method
55 private:
56   bool mySkipEqual;
57 };
58
59 #ifdef WIN32
60 #pragma warning( default:4275 )
61 #endif
62
63 #endif