ome-xml
5.6.0
|
OME model (concrete implementation). More...
#include <ome/xml/model/detail/OMEModel.h>
Public Member Functions | |
OMEModel () | |
Constructor. | |
~OMEModel () | |
Destructor. | |
std::shared_ptr<::ome::xml::model::OMEModelObject > | addModelObject (const std::string &id, std::shared_ptr<::ome::xml::model::OMEModelObject > &object) |
Add a model object to the model. More... | |
std::shared_ptr<::ome::xml::model::OMEModelObject > | removeModelObject (const std::string &id) |
Remove a model object from the model. More... | |
std::shared_ptr<::ome::xml::model::OMEModelObject > | getModelObject (const std::string &id) const |
Retrieve a model object from the model. More... | |
const object_map_type & | getModelObjects () const |
Retrieve all model objects from the model. More... | |
bool | addReference (std::shared_ptr<::ome::xml::model::OMEModelObject > &a, std::shared_ptr< Reference > &b) |
Add a reference to a model object. More... | |
const reference_map_type & | getReferences () const |
Retrieve all references from the model. More... | |
size_type | resolveReferences () |
Resolve all references. More... | |
Public Member Functions inherited from ome::xml::model::OMEModel | |
virtual SKIP std::shared_ptr< OMEModelObject > | addModelObject (const std::string &id, std::shared_ptr< OMEModelObject > &object)=0 |
Add a model object to the model. More... | |
virtual bool | addReference (std::shared_ptr< OMEModelObject > &a, std::shared_ptr< Reference > &b)=0 |
Add a reference to a model object. More... | |
Private Attributes | |
ome::common::Logger | logger |
Message logger. | |
object_map_type | modelObjects |
Mapping of id to model object. | |
reference_map_type | references |
Mapping of model object to reference. | |
Additional Inherited Members | |
Public Types inherited from ome::xml::model::OMEModel | |
typedef std::vector< std::shared_ptr< Reference > > | reference_list_type |
A list of Reference objects. | |
typedef std::map< std::string, std::shared_ptr< OMEModelObject > > | object_map_type |
A map of string model object identifiers to model objects. | |
typedef std::map< std::shared_ptr< OMEModelObject >, reference_list_type > | reference_map_type |
A map of model objects to list of Reference objects. | |
typedef reference_map_type::size_type | size_type |
Size type for reference map. | |
Protected Member Functions inherited from ome::xml::model::OMEModel | |
OMEModel () | |
Constructor. | |
OME model (concrete implementation).
std::shared_ptr<::ome::xml::model::OMEModelObject > ome::xml::model::detail::OMEModel::addModelObject | ( | const std::string & | id, |
std::shared_ptr<::ome::xml::model::OMEModelObject > & | object | ||
) |
Add a model object to the model.
Note that the concrete implementation will not add types derived from Reference.
id | the model object identifier. |
object | the model object to add. |
References modelObjects.
bool ome::xml::model::detail::OMEModel::addReference | ( | std::shared_ptr<::ome::xml::model::OMEModelObject > & | a, |
std::shared_ptr< Reference > & | b | ||
) |
Add a reference to a model object.
a | the model object to reference. |
b | the reference to add. |
References references.
|
virtual |
Retrieve a model object from the model.
id | the model object identifier of the model object to retrieve. |
Implements ome::xml::model::OMEModel.
References modelObjects.
Referenced by resolveReferences().
|
virtual |
Retrieve all model objects from the model.
Implements ome::xml::model::OMEModel.
References modelObjects.
|
virtual |
Retrieve all references from the model.
Implements ome::xml::model::OMEModel.
References references.
|
virtual |
Remove a model object from the model.
id | the model object identifier of the model object to remove. |
Implements ome::xml::model::OMEModel.
References modelObjects.
|
virtual |
Resolve all references.
Check for invalid references and null model objects.
Implements ome::xml::model::OMEModel.
References getModelObject(), logger, and references.