IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BasePlanIndexedColl.h
1 // BasePlanIndexedColl.h:
3 // ----------------------
4 //
14 
15 #ifndef __IPSDKBASEDATA_BASEPLANINDEXEDCOLL_H__
16 #define __IPSDKBASEDATA_BASEPLANINDEXEDCOLL_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::BasePlanIndexedColl::_planIndexedColl' : class 'std::map<_Kty,_Ty>' needs to have dll-interface to be used by clients of class 'ipsdk::BasePlanIndexedColl'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
24 #include <IPSDKBaseData/PlanIndex/PlanIndex.h>
26 #include <IPSDKSerialization/Engine/BaseObjectWithSkeleton.h>
27 #include <map>
28 
29 namespace ipsdk {
30 
33 
35 {
36  // declare serial class
38 
39 // predefined public types
40 public:
42  typedef std::map<PlanIndex, SerializationObjectPtr> PlanIndexedColl;
43 
45  typedef std::map<PlanIndex, SerializationObjectConstPtr> PlanIndexedConstColl;
46 
47 public:
51  virtual ~BasePlanIndexedColl() = 0;
53 
54 // methods
55 public:
57  virtual const std::string& getElementsClassName() const = 0;
58 
61  virtual bool haveSkeleton() const = 0;
62 
64  const PlanIndexedConstColl& getBaseColl() const;
65 
67  ipUInt64 getNbPlans() const;
68 
71  ipUInt64 getMaxSizeZ() const;
72  ipUInt64 getMaxSizeC() const;
73  ipUInt64 getMaxSizeT() const;
75 
78  bool exists(const PlanIndex& planIndex) const;
79  bool exists(const ipUInt64 zPlanIdx,
80  const ipUInt64 cPlanIdx,
81  const ipUInt64 tPlanIdx) const;
83 
85  bool isComplete() const;
86 
88  bool isComplete(const ipUInt64 sizeZ,
89  const ipUInt64 sizeC,
90  const ipUInt64 sizeT) const;
91 
95  const PlanIndex& getPlanIndex(const ipUInt64 planOffset) const;
96 
98  void clear();
99 
100 protected:
106  void insert(const PlanIndex& planIndex,
107  const SerializationObjectPtr& pObject);
108 
111  void assign(const BaseSerializationObject& object,
112  const ipUInt64 sizeZ,
113  const ipUInt64 sizeC,
114  const ipUInt64 sizeT);
115 
120  SerializationObjectConstPtr getStorage(const PlanIndex& planIndex) const;
121  const SerializationObjectPtr& getStorage(const PlanIndex& planIndex);
123 
124 // attributes
125 protected:
128 };
129 
132 
133 } // end of namespace ipsdk
134 
135 #pragma warning (pop)
136 
137 #endif // __IPSDKBASEDATA_BASEPLANINDEXEDCOLL_H__
std::map< PlanIndex, SerializationObjectPtr > PlanIndexedColl
collection of plan indexed serializable object shared pointers
Definition: BasePlanIndexedColl.h:42
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
boost::shared_ptr< const BaseSerializationObject > SerializationObjectConstPtr
shared pointer to a const base serialization object
Definition: SerializationTypes.h:32
PlanIndexedColl _planIndexedColl
collection of plan indexed elements associated to attribute
Definition: BasePlanIndexedColl.h:127
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
#define IPSDK_DECLARE_ABSTRACT_SERIAL_WITHOUT_COPY(libraryName, className)
macro enabling serialization on abstract class
Definition: SerializationHdrMacro.h:97
Definition of import/export macro for library.
IPSDK_FORCEINLINE PackT assign(const typename PackT::DataType &value)
creates and returns a pack, whose all elements equal a given value
Definition: assign.h:33
Predefined types for plan indexed collection management.
boost::shared_ptr< BaseSerializationObject > SerializationObjectPtr
shared pointer to a base serialization object
Definition: SerializationTypes.h:23
Class used to store image plan index.
Definition: PlanIndex.h:26
Base class for serialization object with three serialization modes :
Definition: BaseObjectWithSkeleton.h:33
std::map< PlanIndex, SerializationObjectConstPtr > PlanIndexedConstColl
collection of plan indexed serializable object shared pointers
Definition: BasePlanIndexedColl.h:45
Collection of serializable objects indexed by plan.
Definition: BasePlanIndexedColl.h:34
#define IPSDKBASEDATA_API
Import/Export macro for library IPSDKUtil.
Definition: IPSDKBaseDataExports.h:27
Base class for serializable class.
Definition: BaseSerializationObject.h:33
IPSDKIMAGEPROCESSING_API processor::RulePtr isComplete(const ImageAttributeConstWeakPtr &pAttribute)
functions allowing to check where an image is a complete image (not a sub image)