11 #ifndef GI_INV_UNIVERSE_HPP
12 #define GI_INV_UNIVERSE_HPP
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
20 #include "modelgbp/inv/LocalEndpointInventory.hpp"
24 #include "modelgbp/inv/RemoteEndpointInventory.hpp"
30 :
public opflex::modb::mointernal::MO
37 static const opflex::modb::class_id_t
CLASS_ID = 116;
50 static boost::optional<OF_SHARED_PTR<modelgbp::inv::Universe> >
resolve(
51 opflex::ofcore::OFFramework& framework,
52 const opflex::modb::URI& uri)
54 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::Universe>(framework,
CLASS_ID, uri);
68 static boost::optional<OF_SHARED_PTR<modelgbp::inv::Universe> >
resolve(
69 const opflex::modb::URI& uri)
71 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::Universe>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
88 static boost::optional<OF_SHARED_PTR<modelgbp::inv::Universe> >
resolve(
89 opflex::ofcore::OFFramework& framework)
91 return resolve(framework,opflex::modb::URIBuilder().addElement(
"InvUniverse").build());
107 static boost::optional<OF_SHARED_PTR<modelgbp::inv::Universe> >
resolve(
110 return resolve(opflex::ofcore::OFFramework::defaultInstance());
125 const std::string& invLocalEndpointInventoryName)
143 const std::string& invLocalEndpointInventoryName)
145 OF_SHARED_PTR<modelgbp::inv::LocalEndpointInventory> result = addChild<modelgbp::inv::LocalEndpointInventory>(
146 CLASS_ID, getURI(), 2151284853ul, 117,
147 opflex::modb::URIBuilder(getURI()).addElement(
"InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).build()
149 result->setName(invLocalEndpointInventoryName);
169 opflex::modb::mointernal::MO::resolveChildren<modelgbp::inv::LocalEndpointInventory>(
170 getFramework(),
CLASS_ID, getURI(), 2151284853ul, 117, out);
201 OF_SHARED_PTR<modelgbp::inv::RemoteEndpointInventory> result = addChild<modelgbp::inv::RemoteEndpointInventory>(
202 CLASS_ID, getURI(), 2151284877ul, 141,
203 opflex::modb::URIBuilder(getURI()).addElement(
"InvRemoteEndpointInventory").build()
218 getTLMutator().remove(
CLASS_ID, getURI());
231 static void remove(opflex::ofcore::OFFramework& framework,
232 const opflex::modb::URI& uri)
234 MO::remove(framework,
CLASS_ID, uri);
247 static void remove(
const opflex::modb::URI& uri)
249 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
264 opflex::ofcore::OFFramework& framework,
265 opflex::modb::ObjectListener* listener)
267 opflex::modb::mointernal
268 ::MO::registerListener(framework, listener,
CLASS_ID);
283 opflex::modb::ObjectListener* listener)
295 opflex::ofcore::OFFramework& framework,
296 opflex::modb::ObjectListener* listener)
298 opflex::modb::mointernal
299 ::MO::unregisterListener(framework, listener,
CLASS_ID);
309 opflex::modb::ObjectListener* listener)
319 opflex::ofcore::OFFramework& framework,
320 const opflex::modb::URI& uri,
321 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
322 : MO(framework,
CLASS_ID, uri, oi) { }
327 #endif // GI_INV_UNIVERSE_HPP
static void registerListener(opflex::modb::ObjectListener *listener)
Register a listener that will get called for changes related to this class with the default framework...
Definition: inv/Universe.hpp:282
static void registerListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Register a listener that will get called for changes related to this class.
Definition: inv/Universe.hpp:263
boost::optional< OF_SHARED_PTR< modelgbp::inv::LocalEndpointInventory > > resolveInvLocalEndpointInventory(const std::string &invLocalEndpointInventoryName)
Retrieve the child object with the specified naming properties.
Definition: inv/Universe.hpp:124
Definition: inv/Universe.hpp:29
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: inv/Universe.hpp:308
static boost::optional< OF_SHARED_PTR< modelgbp::inv::Universe > > resolve(opflex::ofcore::OFFramework &framework)
Retrieve an instance of Universe from the managed object store by constructing its URI from the path ...
Definition: inv/Universe.hpp:88
static boost::optional< OF_SHARED_PTR< modelgbp::inv::Universe > > resolve()
Retrieve an instance of Universe from the default managed object store by constructing its URI from t...
Definition: inv/Universe.hpp:107
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Universe.
Definition: inv/Universe.hpp:37
OF_SHARED_PTR< modelgbp::inv::RemoteEndpointInventory > addInvRemoteEndpointInventory()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: inv/Universe.hpp:198
static boost::optional< OF_SHARED_PTR< modelgbp::inv::RemoteEndpointInventory > > resolve()
Retrieve an instance of RemoteEndpointInventory from the default managed object store by constructing...
Definition: RemoteEndpointInventory.hpp:107
static boost::optional< OF_SHARED_PTR< modelgbp::inv::LocalEndpointInventory > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalEndpointInventory from the managed object store.
Definition: LocalEndpointInventory.hpp:106
Universe(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Universe.
Definition: inv/Universe.hpp:318
void resolveInvLocalEndpointInventory(std::vector< OF_SHARED_PTR< modelgbp::inv::LocalEndpointInventory > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::inv::LocalEndpointInventory.
Definition: inv/Universe.hpp:167
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: inv/Universe.hpp:294
boost::optional< OF_SHARED_PTR< modelgbp::inv::RemoteEndpointInventory > > resolveInvRemoteEndpointInventory()
Retrieve the child object with the specified naming properties.
Definition: inv/Universe.hpp:182
OF_SHARED_PTR< modelgbp::inv::LocalEndpointInventory > addInvLocalEndpointInventory(const std::string &invLocalEndpointInventoryName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: inv/Universe.hpp:142
static boost::optional< OF_SHARED_PTR< modelgbp::inv::Universe > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Universe from the managed object store.
Definition: inv/Universe.hpp:50
static boost::optional< OF_SHARED_PTR< modelgbp::inv::Universe > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of Universe from the managed object store using the default framework instance...
Definition: inv/Universe.hpp:68