bioformats
5.1.6
|
OME model (concrete implementation). More...
#include <ome/xml/model/detail/OMEModel.h>
Public Member Functions | |
OMEModel () | |
Constructor. | |
~OMEModel () | |
Destructor. | |
ome::compat::shared_ptr< ::ome::xml::model::OMEModelObject > | addModelObject (const std::string &id, ome::compat::shared_ptr< ::ome::xml::model::OMEModelObject > &object) |
Add a model object to the model. More... | |
ome::compat::shared_ptr< ::ome::xml::model::OMEModelObject > | removeModelObject (const std::string &id) |
Remove a model object from the model. More... | |
ome::compat::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 (ome::compat::shared_ptr< ::ome::xml::model::OMEModelObject > &a, ome::compat::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 ome::compat::shared_ptr< OMEModelObject > | addModelObject (const std::string &id, ome::compat::shared_ptr< OMEModelObject > &object)=0 |
Add a model object to the model. More... | |
virtual bool | addReference (ome::compat::shared_ptr< OMEModelObject > &a, ome::compat::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< ome::compat::shared_ptr< Reference > > | reference_list_type |
A list of Reference objects. | |
typedef std::map< std::string, ome::compat::shared_ptr< OMEModelObject > > | object_map_type |
A map of string model object identifiers to model objects. | |
typedef std::map< ome::compat::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).
ome::compat::shared_ptr<::ome::xml::model::OMEModelObject > ome::xml::model::detail::OMEModel::addModelObject | ( | const std::string & | id, |
ome::compat::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 | ( | ome::compat::shared_ptr< ::ome::xml::model::OMEModelObject > & | a, |
ome::compat::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.