11 #ifndef GI_INV_LOCALENDPOINTINVENTORY_HPP 12 #define GI_INV_LOCALENDPOINTINVENTORY_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 20 #include "modelgbp/domain/ConfigFromEndpointInventoryRTgt.hpp" 24 #include "modelgbp/inv/LocalInventoryEp.hpp" 30 :
public opflex::modb::mointernal::MO
37 static const opflex::modb::class_id_t
CLASS_ID = 114;
45 return getObjectInstance().isSet(3735553ul, opflex::modb::PropertyInfo::STRING);
52 boost::optional<const std::string&>
getName()
55 return getObjectInstance().getString(3735553ul);
64 const std::string&
getName(
const std::string& defaultValue)
66 return getName().get_value_or(defaultValue);
79 getTLMutator().modify(getClassId(), getURI())->setString(3735553ul, newValue);
91 getTLMutator().modify(getClassId(), getURI())->unset(3735553ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
106 static boost::optional<OF_SHARED_PTR<modelgbp::inv::LocalEndpointInventory> >
resolve(
107 opflex::ofcore::OFFramework& framework,
108 const opflex::modb::URI& uri)
110 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::LocalEndpointInventory>(framework,
CLASS_ID, uri);
124 static boost::optional<OF_SHARED_PTR<modelgbp::inv::LocalEndpointInventory> >
resolve(
125 const opflex::modb::URI& uri)
127 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::LocalEndpointInventory>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
146 static boost::optional<OF_SHARED_PTR<modelgbp::inv::LocalEndpointInventory> >
resolve(
147 opflex::ofcore::OFFramework& framework,
148 const std::string& invLocalEndpointInventoryName)
150 return resolve(framework,opflex::modb::URIBuilder().addElement(
"InvUniverse").addElement(
"InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).build());
168 static boost::optional<OF_SHARED_PTR<modelgbp::inv::LocalEndpointInventory> >
resolve(
169 const std::string& invLocalEndpointInventoryName)
171 return resolve(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName);
186 const std::string& domainConfigFromEndpointInventoryRTgtSource)
204 const std::string& domainConfigFromEndpointInventoryRTgtSource)
206 OF_SHARED_PTR<modelgbp::domain::ConfigFromEndpointInventoryRTgt> result = addChild<modelgbp::domain::ConfigFromEndpointInventoryRTgt>(
207 CLASS_ID, getURI(), 2151219261ul, 61,
208 opflex::modb::URIBuilder(getURI()).addElement(
"DomainConfigFromEndpointInventoryRTgt").addElement(domainConfigFromEndpointInventoryRTgtSource).build()
210 result->setSource(domainConfigFromEndpointInventoryRTgtSource);
230 opflex::modb::mointernal::MO::resolveChildren<modelgbp::domain::ConfigFromEndpointInventoryRTgt>(
231 getFramework(),
CLASS_ID, getURI(), 2151219261ul, 61, out);
246 const std::string& invLocalInventoryEpUuid)
264 const std::string& invLocalInventoryEpUuid)
266 OF_SHARED_PTR<modelgbp::inv::LocalInventoryEp> result = addChild<modelgbp::inv::LocalInventoryEp>(
267 CLASS_ID, getURI(), 2151219316ul, 116,
268 opflex::modb::URIBuilder(getURI()).addElement(
"InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).build()
270 result->setUuid(invLocalInventoryEpUuid);
290 opflex::modb::mointernal::MO::resolveChildren<modelgbp::inv::LocalInventoryEp>(
291 getFramework(),
CLASS_ID, getURI(), 2151219316ul, 116, out);
304 getTLMutator().remove(
CLASS_ID, getURI());
317 static void remove(opflex::ofcore::OFFramework& framework,
318 const opflex::modb::URI& uri)
320 MO::remove(framework,
CLASS_ID, uri);
333 static void remove(
const opflex::modb::URI& uri)
335 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
353 opflex::ofcore::OFFramework& framework,
354 const std::string& invLocalEndpointInventoryName)
356 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"InvUniverse").addElement(
"InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).build());
374 const std::string& invLocalEndpointInventoryName)
376 remove(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName);
391 opflex::ofcore::OFFramework& framework,
392 opflex::modb::ObjectListener* listener)
394 opflex::modb::mointernal
395 ::MO::registerListener(framework, listener,
CLASS_ID);
410 opflex::modb::ObjectListener* listener)
422 opflex::ofcore::OFFramework& framework,
423 opflex::modb::ObjectListener* listener)
425 opflex::modb::mointernal
426 ::MO::unregisterListener(framework, listener,
CLASS_ID);
436 opflex::modb::ObjectListener* listener)
446 opflex::ofcore::OFFramework& framework,
447 const opflex::modb::URI& uri,
448 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
449 : MO(framework,
CLASS_ID, uri, oi) { }
454 #endif // GI_INV_LOCALENDPOINTINVENTORY_HPP void resolveDomainConfigFromEndpointInventoryRTgt(std::vector< OF_SHARED_PTR< modelgbp::domain::ConfigFromEndpointInventoryRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::domain::ConfigFromEndpointInvent...
Definition: LocalEndpointInventory.hpp:228
void resolveInvLocalInventoryEp(std::vector< OF_SHARED_PTR< modelgbp::inv::LocalInventoryEp > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::inv::LocalInventoryEp.
Definition: LocalEndpointInventory.hpp:288
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for LocalEndpointInventory.
Definition: LocalEndpointInventory.hpp:37
boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigFromEndpointInventoryRTgt > > resolveDomainConfigFromEndpointInventoryRTgt(const std::string &domainConfigFromEndpointInventoryRTgtSource)
Retrieve the child object with the specified naming properties.
Definition: LocalEndpointInventory.hpp:185
modelgbp::inv::LocalEndpointInventory & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: LocalEndpointInventory.hpp:77
LocalEndpointInventory(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of LocalEndpointInventory.
Definition: LocalEndpointInventory.hpp:445
OF_SHARED_PTR< modelgbp::domain::ConfigFromEndpointInventoryRTgt > addDomainConfigFromEndpointInventoryRTgt(const std::string &domainConfigFromEndpointInventoryRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: LocalEndpointInventory.hpp:203
static boost::optional< OF_SHARED_PTR< modelgbp::inv::LocalEndpointInventory > > resolve(opflex::ofcore::OFFramework &framework, const std::string &invLocalEndpointInventoryName)
Retrieve an instance of LocalEndpointInventory from the managed object store by constructing its URI ...
Definition: LocalEndpointInventory.hpp:146
static boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigFromEndpointInventoryRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of ConfigFromEndpointInventoryRTgt from the managed object store.
Definition: ConfigFromEndpointInventoryRTgt.hpp:210
bool isNameSet()
Check whether name has been set.
Definition: LocalEndpointInventory.hpp:43
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: LocalEndpointInventory.hpp:390
boost::optional< OF_SHARED_PTR< modelgbp::inv::LocalInventoryEp > > resolveInvLocalInventoryEp(const std::string &invLocalInventoryEpUuid)
Retrieve the child object with the specified naming properties.
Definition: LocalEndpointInventory.hpp:245
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: LocalEndpointInventory.hpp:64
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: LocalEndpointInventory.hpp:52
OF_SHARED_PTR< modelgbp::inv::LocalInventoryEp > addInvLocalInventoryEp(const std::string &invLocalInventoryEpUuid)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: LocalEndpointInventory.hpp:263
Definition: LocalEndpointInventory.hpp:29
static boost::optional< OF_SHARED_PTR< modelgbp::inv::LocalInventoryEp > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalInventoryEp from the managed object store.
Definition: LocalInventoryEp.hpp:410
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: LocalEndpointInventory.hpp:421
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
static boost::optional< OF_SHARED_PTR< modelgbp::inv::LocalEndpointInventory > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of LocalEndpointInventory from the managed object store using the default framew...
Definition: LocalEndpointInventory.hpp:124
static boost::optional< OF_SHARED_PTR< modelgbp::inv::LocalEndpointInventory > > resolve(const std::string &invLocalEndpointInventoryName)
Retrieve an instance of LocalEndpointInventory from the default managed object store by constructing ...
Definition: LocalEndpointInventory.hpp:168
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: LocalEndpointInventory.hpp:409
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: LocalEndpointInventory.hpp:435
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
modelgbp::inv::LocalEndpointInventory & unsetName()
Unset name in the currently-active mutator.
Definition: LocalEndpointInventory.hpp:89