11#ifndef GI_SPAN_LOCALEP_HPP
12#define GI_SPAN_LOCALEP_HPP
14#include <boost/optional.hpp>
15#include "opflex/modb/URIBuilder.h"
16#include "opflex/modb/mo-internal/MO.h"
20#include "modelgbp/span/LocalEpToEpRSrc.hpp"
24#include "modelgbp/span/MemberFromRefRTgt.hpp"
30 :
public opflex::modb::mointernal::MO
37 static const opflex::modb::class_id_t
CLASS_ID = 69;
45 return getObjectInstance().isSet(2260993ul, opflex::modb::PropertyInfo::STRING);
52 boost::optional<const std::string&>
getName()
55 return getObjectInstance().getString(2260993ul);
64 const std::string&
getName(
const std::string& defaultValue)
66 return getName().get_value_or(defaultValue);
79 getTLMutator().modify(getClassId(), getURI())->setString(2260993ul, newValue);
91 getTLMutator().modify(getClassId(), getURI())->unset(2260993ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
101 return getObjectInstance().isSet(2260994ul, opflex::modb::PropertyInfo::STRING);
108 boost::optional<const std::string&>
getNic()
111 return getObjectInstance().getString(2260994ul);
120 const std::string&
getNic(
const std::string& defaultValue)
122 return getNic().get_value_or(defaultValue);
135 getTLMutator().modify(getClassId(), getURI())->setString(2260994ul, newValue);
147 getTLMutator().modify(getClassId(), getURI())->unset(2260994ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
162 static boost::optional<OF_SHARED_PTR<modelgbp::span::LocalEp> >
resolve(
163 opflex::ofcore::OFFramework& framework,
164 const opflex::modb::URI& uri)
166 return opflex::modb::mointernal::MO::resolve<modelgbp::span::LocalEp>(framework,
CLASS_ID, uri);
180 static boost::optional<OF_SHARED_PTR<modelgbp::span::LocalEp> >
resolve(
181 const opflex::modb::URI& uri)
183 return opflex::modb::mointernal::MO::resolve<modelgbp::span::LocalEp>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
204 static boost::optional<OF_SHARED_PTR<modelgbp::span::LocalEp> >
resolve(
205 opflex::ofcore::OFFramework& framework,
206 const std::string& platformConfigName,
207 const std::string& spanLocalEpName)
209 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).addElement(
"SpanLocalEp").addElement(spanLocalEpName).build());
229 static boost::optional<OF_SHARED_PTR<modelgbp::span::LocalEp> >
resolve(
230 const std::string& platformConfigName,
231 const std::string& spanLocalEpName)
233 return resolve(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,spanLocalEpName);
264 OF_SHARED_PTR<modelgbp::span::LocalEpToEpRSrc> result = addChild<modelgbp::span::LocalEpToEpRSrc>(
265 CLASS_ID, getURI(), 2149744710ul, 70,
266 opflex::modb::URIBuilder(getURI()).addElement(
"SpanLocalEpToEpRSrc").build()
283 const std::string& spanMemberFromRefRTgtSource)
301 const std::string& spanMemberFromRefRTgtSource)
303 OF_SHARED_PTR<modelgbp::span::MemberFromRefRTgt> result = addChild<modelgbp::span::MemberFromRefRTgt>(
304 CLASS_ID, getURI(), 2149744715ul, 75,
305 opflex::modb::URIBuilder(getURI()).addElement(
"SpanMemberFromRefRTgt").addElement(spanMemberFromRefRTgtSource).build()
307 result->setSource(spanMemberFromRefRTgtSource);
327 opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::MemberFromRefRTgt>(
328 getFramework(),
CLASS_ID, getURI(), 2149744715ul, 75, out);
341 getTLMutator().remove(
CLASS_ID, getURI());
354 static void remove(opflex::ofcore::OFFramework& framework,
355 const opflex::modb::URI& uri)
357 MO::remove(framework,
CLASS_ID, uri);
370 static void remove(
const opflex::modb::URI& uri)
372 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
392 opflex::ofcore::OFFramework& framework,
393 const std::string& platformConfigName,
394 const std::string& spanLocalEpName)
396 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).addElement(
"SpanLocalEp").addElement(spanLocalEpName).build());
416 const std::string& platformConfigName,
417 const std::string& spanLocalEpName)
419 remove(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,spanLocalEpName);
434 opflex::ofcore::OFFramework& framework,
435 opflex::modb::ObjectListener* listener)
437 opflex::modb::mointernal
438 ::MO::registerListener(framework, listener,
CLASS_ID);
453 opflex::modb::ObjectListener* listener)
465 opflex::ofcore::OFFramework& framework,
466 opflex::modb::ObjectListener* listener)
468 opflex::modb::mointernal
469 ::MO::unregisterListener(framework, listener,
CLASS_ID);
479 opflex::modb::ObjectListener* listener)
489 opflex::ofcore::OFFramework& framework,
490 const opflex::modb::URI& uri,
491 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
492 : MO(framework,
CLASS_ID, uri, oi) { }
static boost::optional< OF_SHARED_PTR< modelgbp::span::LocalEpToEpRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalEpToEpRSrc from the managed object store.
Definition LocalEpToEpRSrc.hpp:297
Definition LocalEp.hpp:31
OF_SHARED_PTR< modelgbp::span::LocalEpToEpRSrc > addSpanLocalEpToEpRSrc()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition LocalEp.hpp:261
static boost::optional< OF_SHARED_PTR< modelgbp::span::LocalEp > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of LocalEp from the managed object store using the default framework instance.
Definition LocalEp.hpp:180
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition LocalEp.hpp:464
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 LocalEp.hpp:433
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition LocalEp.hpp:64
OF_SHARED_PTR< modelgbp::span::MemberFromRefRTgt > addSpanMemberFromRefRTgt(const std::string &spanMemberFromRefRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition LocalEp.hpp:300
boost::optional< OF_SHARED_PTR< modelgbp::span::MemberFromRefRTgt > > resolveSpanMemberFromRefRTgt(const std::string &spanMemberFromRefRTgtSource)
Retrieve the child object with the specified naming properties.
Definition LocalEp.hpp:282
LocalEp(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of LocalEp.
Definition LocalEp.hpp:488
const std::string & getNic(const std::string &defaultValue)
Get the value of nic if set, otherwise the value of default passed in.
Definition LocalEp.hpp:120
modelgbp::span::LocalEp & unsetName()
Unset name in the currently-active mutator.
Definition LocalEp.hpp:89
boost::optional< const std::string & > getNic()
Get the value of nic if it has been set.
Definition LocalEp.hpp:108
bool isNicSet()
Check whether nic has been set.
Definition LocalEp.hpp:99
static boost::optional< OF_SHARED_PTR< modelgbp::span::LocalEp > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalEp from the managed object store.
Definition LocalEp.hpp:162
static void remove(const opflex::modb::URI &uri)
Remove the LocalEp object with the specified URI using the currently-active mutator and the default f...
Definition LocalEp.hpp:370
modelgbp::span::LocalEp & setNic(const std::string &newValue)
Set nic to the specified value in the currently-active mutator.
Definition LocalEp.hpp:133
static void remove(const std::string &platformConfigName, const std::string &spanLocalEpName)
Remove the LocalEp object with the specified path elements from the managed object store using the de...
Definition LocalEp.hpp:415
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the LocalEp object with the specified URI using the currently-active mutator.
Definition LocalEp.hpp:354
static boost::optional< OF_SHARED_PTR< modelgbp::span::LocalEp > > resolve(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &spanLocalEpName)
Retrieve an instance of LocalEp from the managed object store by constructing its URI from the path e...
Definition LocalEp.hpp:204
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition LocalEp.hpp:478
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 LocalEp.hpp:452
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for LocalEp.
Definition LocalEp.hpp:37
boost::optional< OF_SHARED_PTR< modelgbp::span::LocalEpToEpRSrc > > resolveSpanLocalEpToEpRSrc()
Retrieve the child object with the specified naming properties.
Definition LocalEp.hpp:245
void resolveSpanMemberFromRefRTgt(std::vector< OF_SHARED_PTR< modelgbp::span::MemberFromRefRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::span::MemberFromRefRTgt.
Definition LocalEp.hpp:325
static boost::optional< OF_SHARED_PTR< modelgbp::span::LocalEp > > resolve(const std::string &platformConfigName, const std::string &spanLocalEpName)
Retrieve an instance of LocalEp from the default managed object store by constructing its URI from th...
Definition LocalEp.hpp:229
static void remove(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &spanLocalEpName)
Remove the LocalEp object with the specified path elements from the managed object store.
Definition LocalEp.hpp:391
void remove()
Remove this instance using the currently-active mutator.
Definition LocalEp.hpp:339
modelgbp::span::LocalEp & unsetNic()
Unset nic in the currently-active mutator.
Definition LocalEp.hpp:145
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition LocalEp.hpp:52
bool isNameSet()
Check whether name has been set.
Definition LocalEp.hpp:43
modelgbp::span::LocalEp & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition LocalEp.hpp:77
static boost::optional< OF_SHARED_PTR< modelgbp::span::MemberFromRefRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of MemberFromRefRTgt from the managed object store.
Definition MemberFromRefRTgt.hpp:210
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12