6#include <icomp/CComponentBase.h>
7#include <iprm/COptionsManager.h>
10#include <imtbase/CObjectCollection.h>
11#include <imtbase/TFilterableCollectionWrap.h>
24 public icomp::CComponentBase,
25 public imtbase::TFilterableCollectionWrap<CObjectCollectionBase>,
26 virtual public IObjectCollection::IDataFactory
29 typedef icomp::CComponentBase BaseClass;
30 typedef imtbase::TFilterableCollectionWrap <CObjectCollectionBase> BaseClass2;
36 I_REGISTER_INTERFACE(iser::ISerializable);
37 I_REGISTER_INTERFACE(IObjectCollection::IDataFactory);
38 I_ASSIGN_MULTI_0(m_objectFactoriesCompPtr,
"ObjectFactories",
"List of factories used for object creation",
false);
39 I_ASSIGN_MULTI_0(m_objectPersistenceListCompPtr,
"ObjectPersistenceList",
"List of persistence components used for object data persistence",
false);
40 I_ASSIGN_MULTI_0(m_typeIdsAttrPtr,
"TypeIds",
"List of type-ID corresponding to the registered factories",
false);
41 I_ASSIGN_MULTI_0(m_typeNamesAttrPtr,
"TypeNames",
"List of type names corresponding to the registered factories",
false);
42 I_ASSIGN_MULTI_0(m_fixedObjectsCompPtr,
"FixedObjects",
"List of static defined objects",
false);
43 I_ASSIGN_MULTI_0(m_fixedObjectIdsAttrPtr,
"FixedObjectIds",
"List of IDs for corresponding fixed object",
false);
44 I_ASSIGN_MULTI_0(m_fixedObjectTypeIdsAttrPtr,
"FixedObjectTypeIds",
"List of type-IDs for corresponding fixed object",
false);
45 I_ASSIGN_MULTI_0(m_fixedObjectNamesAttrPtr,
"FixedObjectNames",
"List of names for corresponding fixed object",
false);
46 I_ASSIGN_MULTI_0(m_fixedObjectTypeNamesAttrPtr,
"FixedObjectTypeNames",
"List of names for corresponding fixed object type",
false);
47 I_ASSIGN_MULTI_0(m_externalTypeIdsAttrPtr,
"ExternaObjectTypeIds",
"List of IDs for object types should be stored in the external storage",
false);
48 I_ASSIGN(m_externalStorageCompPtr,
"ExternalStorage",
"External storage used to persist objects of types specified in 'ExternaObjectTypeIds'",
false,
"ExternalStorage");
52 virtual istd::IChangeableUniquePtr CreateInstance(
const QByteArray& keyId =
"")
const override;
53 virtual istd::IFactoryInfo::KeyList GetFactoryKeys()
const override;
56 virtual const iprm::IOptionsList* GetObjectTypesInfo()
const override;
59 virtual const ifile::IFilePersistence* GetPersistenceForObjectType(
const QByteArray& typeId)
const override;
62 virtual bool ResetData(CompatibilityMode mode = CM_WITHOUT_REFS)
override;
66 virtual istd::IChangeableUniquePtr CreateObjectInstance(
const QByteArray& typeId)
const override;
67 virtual IObjectCollection* GetObjectStorage(
const QByteArray& typeId,
const istd::IChangeable* objectPtr)
const override;
70 virtual void OnComponentCreated()
override;
71 virtual void OnComponentDestroyed()
override;
74 I_MULTIFACT(istd::IChangeable, m_objectFactoriesCompPtr);
75 I_MULTIATTR(QByteArray, m_typeIdsAttrPtr);
76 I_MULTITEXTATTR(m_typeNamesAttrPtr);
77 I_MULTIREF(istd::IChangeable, m_fixedObjectsCompPtr);
78 I_MULTIATTR(QByteArray, m_fixedObjectIdsAttrPtr);
79 I_MULTIATTR(QByteArray, m_fixedObjectTypeIdsAttrPtr);
80 I_MULTITEXTATTR(m_fixedObjectNamesAttrPtr);
81 I_MULTITEXTATTR(m_fixedObjectTypeNamesAttrPtr);
82 I_MULTIREF(ifile::IFilePersistence, m_objectPersistenceListCompPtr);
83 I_MULTIATTR(QByteArray, m_externalTypeIdsAttrPtr);
86 iprm::COptionsManager m_typesInfo;