IObjectQueue.h
Go to the documentation of this file.
1 #ifndef ibase_IObjectQueue_included
2 #define ibase_IObjectQueue_included
3 
4 
5 // Qt includes
6 #include <QtCore/QByteArray>
7 #include <QtCore/QVector>
8 
9 // ACF includes
10 #include <istd/IChangeable.h>
11 
12 
13 namespace ibase
14 {
15 
16 
20 class IObjectQueue: virtual public istd::IChangeable
21 {
22 public:
23  typedef QVector<istd::IChangeable*> ObjectList;
24 
29  virtual int GetObjectsCount(const QByteArray* typeIdPtr = NULL) const = 0;
30 
34  virtual void ClearQueue() = 0;
35 
42  virtual istd::IChangeable* CreateFrontObject(int offsetPos = 0, const QByteArray* typeIdPtr = NULL) = 0;
49  virtual istd::IChangeable* CreateBackObject(int offsetPos = 0, const QByteArray* typeIdPtr = NULL) = 0;
50 
57  virtual void RemoveFrontObject(int offsetPos = 0, const QByteArray* typeIdPtr = NULL) = 0;
64  virtual void RemoveBackObject(int offsetPos = 0, const QByteArray* typeIdPtr = NULL) = 0;
65 
71  virtual istd::IChangeable* GetFrontObject(int offsetPos = 0, const QByteArray* typeIdPtr = NULL) const = 0;
77  virtual istd::IChangeable* GetBackObject(int offsetPos = 0, const QByteArray* typeIdPtr = NULL) const = 0;
78 
82  virtual void SelectObjects(
83  ObjectList& result,
84  bool doAppend = false,
85  int offsetPos = 0,
86  const QByteArray* typeIdPtr = NULL) const = 0;
87 
94  virtual istd::IChangeable* PopFrontObject(int offsetPos = 0, const QByteArray* typeIdPtr = NULL) = 0;
101  virtual istd::IChangeable* PopBackObject(int offsetPos = 0, const QByteArray* typeIdPtr = NULL) = 0;
102 };
103 
104 
105 } // namespace ibase
106 
107 
108 #endif // !ibase_IObjectQueue_included
109 
110 
virtual istd::IChangeable * CreateFrontObject(int offsetPos=0, const QByteArray *typeIdPtr=NULL)=0
Create object at the front of this queue.
virtual istd::IChangeable * PopBackObject(int offsetPos=0, const QByteArray *typeIdPtr=NULL)=0
Get object at the end of queue and remove it from queue.
virtual istd::IChangeable * CreateBackObject(int offsetPos=0, const QByteArray *typeIdPtr=NULL)=0
Create object at the end of this queue.
virtual istd::IChangeable * GetBackObject(int offsetPos=0, const QByteArray *typeIdPtr=NULL) const =0
Get object at the end of queue.
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
virtual void SelectObjects(ObjectList &result, bool doAppend=false, int offsetPos=0, const QByteArray *typeIdPtr=NULL) const =0
Find set of objects.
virtual istd::IChangeable * GetFrontObject(int offsetPos=0, const QByteArray *typeIdPtr=NULL) const =0
Get object at the front of queue.
virtual void RemoveBackObject(int offsetPos=0, const QByteArray *typeIdPtr=NULL)=0
Remove object at the end of this queue.
virtual void ClearQueue()=0
Remove all objects from queue.
#define NULL
Definition: istd.h:64
Interface allowing to manage queue of some objects.
Definition: IObjectQueue.h:20
virtual int GetObjectsCount(const QByteArray *typeIdPtr=NULL) const =0
Get number of objects in this queue.
virtual void RemoveFrontObject(int offsetPos=0, const QByteArray *typeIdPtr=NULL)=0
Remove object at the front of this queue.
virtual istd::IChangeable * PopFrontObject(int offsetPos=0, const QByteArray *typeIdPtr=NULL)=0
Get object at the front of queue and remove it from queue.
QVector< istd::IChangeable * > ObjectList
Definition: IObjectQueue.h:23

© 2007-2017 Witold Gantzke and Kirill Lepskiy