11 #ifndef GI_SPAN_SRCMEMBER_HPP
12 #define GI_SPAN_SRCMEMBER_HPP
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
20 #include "modelgbp/span/MemberToRefRSrc.hpp"
26 :
public opflex::modb::mointernal::MO
33 static const opflex::modb::class_id_t
CLASS_ID = 77;
41 return getObjectInstance().isSet(2523138ul, opflex::modb::PropertyInfo::ENUM8);
48 boost::optional<const uint8_t>
getDir()
51 return (
const uint8_t)getObjectInstance().getUInt64(2523138ul);
60 const uint8_t
getDir(
const uint8_t defaultValue)
62 return getDir().get_value_or(defaultValue);
75 getTLMutator().modify(getClassId(), getURI())->setUInt64(2523138ul, newValue);
87 getTLMutator().modify(getClassId(), getURI())->unset(2523138ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
97 return getObjectInstance().isSet(2523137ul, opflex::modb::PropertyInfo::STRING);
107 return getObjectInstance().getString(2523137ul);
116 const std::string&
getName(
const std::string& defaultValue)
118 return getName().get_value_or(defaultValue);
131 getTLMutator().modify(getClassId(), getURI())->setString(2523137ul, newValue);
143 getTLMutator().modify(getClassId(), getURI())->unset(2523137ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
158 static boost::optional<OF_SHARED_PTR<modelgbp::span::SrcMember> >
resolve(
159 opflex::ofcore::OFFramework& framework,
160 const opflex::modb::URI& uri)
162 return opflex::modb::mointernal::MO::resolve<modelgbp::span::SrcMember>(framework,
CLASS_ID, uri);
176 static boost::optional<OF_SHARED_PTR<modelgbp::span::SrcMember> >
resolve(
177 const opflex::modb::URI& uri)
179 return opflex::modb::mointernal::MO::resolve<modelgbp::span::SrcMember>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
203 opflex::ofcore::OFFramework& framework,
204 const std::string& platformConfigName,
205 const std::string& spanSrcGrpName,
206 const std::string& spanSrcMemberName)
208 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).addElement(
"SpanSrcGrp").addElement(spanSrcGrpName).addElement(
"SpanSrcMember").addElement(spanSrcMemberName).build());
231 const std::string& platformConfigName,
232 const std::string& spanSrcGrpName,
233 const std::string& spanSrcMemberName)
259 opflex::ofcore::OFFramework& framework,
260 const std::string& platformConfigName,
261 const std::string& spanDstGrpName,
262 const std::string& spanSrcMemberName)
264 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).addElement(
"SpanDstGrp").addElement(spanDstGrpName).addElement(
"SpanSrcMember").addElement(spanSrcMemberName).build());
287 const std::string& platformConfigName,
288 const std::string& spanDstGrpName,
289 const std::string& spanSrcMemberName)
322 OF_SHARED_PTR<modelgbp::span::MemberToRefRSrc> result = addChild<modelgbp::span::MemberToRefRSrc>(
323 CLASS_ID, getURI(), 2150006858ul, 74,
324 opflex::modb::URIBuilder(getURI()).addElement(
"SpanMemberToRefRSrc").build()
339 getTLMutator().remove(
CLASS_ID, getURI());
352 static void remove(opflex::ofcore::OFFramework& framework,
353 const opflex::modb::URI& uri)
355 MO::remove(framework,
CLASS_ID, uri);
368 static void remove(
const opflex::modb::URI& uri)
370 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
392 opflex::ofcore::OFFramework& framework,
393 const std::string& platformConfigName,
394 const std::string& spanSrcGrpName,
395 const std::string& spanSrcMemberName)
397 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).addElement(
"SpanSrcGrp").addElement(spanSrcGrpName).addElement(
"SpanSrcMember").addElement(spanSrcMemberName).build());
419 const std::string& platformConfigName,
420 const std::string& spanSrcGrpName,
421 const std::string& spanSrcMemberName)
445 opflex::ofcore::OFFramework& framework,
446 const std::string& platformConfigName,
447 const std::string& spanDstGrpName,
448 const std::string& spanSrcMemberName)
450 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).addElement(
"SpanDstGrp").addElement(spanDstGrpName).addElement(
"SpanSrcMember").addElement(spanSrcMemberName).build());
472 const std::string& platformConfigName,
473 const std::string& spanDstGrpName,
474 const std::string& spanSrcMemberName)
491 opflex::ofcore::OFFramework& framework,
492 opflex::modb::ObjectListener* listener)
494 opflex::modb::mointernal
495 ::MO::registerListener(framework, listener,
CLASS_ID);
510 opflex::modb::ObjectListener* listener)
522 opflex::ofcore::OFFramework& framework,
523 opflex::modb::ObjectListener* listener)
525 opflex::modb::mointernal
526 ::MO::unregisterListener(framework, listener,
CLASS_ID);
536 opflex::modb::ObjectListener* listener)
546 opflex::ofcore::OFFramework& framework,
547 const opflex::modb::URI& uri,
548 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
549 : MO(framework,
CLASS_ID, uri, oi) { }
554 #endif // GI_SPAN_SRCMEMBER_HPP
bool isDirSet()
Check whether dir has been set.
Definition: SrcMember.hpp:39
static void removeUnderPolicyUniversePlatformConfigSpanSrcGrp(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &spanSrcGrpName, const std::string &spanSrcMemberName)
Remove the SrcMember object with the specified path elements from the managed object store...
Definition: SrcMember.hpp:391
Definition: SrcMember.hpp:25
static boost::optional< OF_SHARED_PTR< modelgbp::span::SrcMember > > resolveUnderPolicyUniversePlatformConfigSpanDstGrp(const std::string &platformConfigName, const std::string &spanDstGrpName, const std::string &spanSrcMemberName)
Retrieve an instance of SrcMember from the default managed object store by constructing its URI from ...
Definition: SrcMember.hpp:286
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: SrcMember.hpp:509
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: SrcMember.hpp:535
const uint8_t getDir(const uint8_t defaultValue)
Get the value of dir if set, otherwise the value of default passed in.
Definition: SrcMember.hpp:60
boost::optional< OF_SHARED_PTR< modelgbp::span::MemberToRefRSrc > > resolveSpanMemberToRefRSrc()
Retrieve the child object with the specified naming properties.
Definition: SrcMember.hpp:303
modelgbp::span::SrcMember & unsetDir()
Unset dir in the currently-active mutator.
Definition: SrcMember.hpp:85
static boost::optional< OF_SHARED_PTR< modelgbp::span::SrcMember > > resolveUnderPolicyUniversePlatformConfigSpanDstGrp(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &spanDstGrpName, const std::string &spanSrcMemberName)
Retrieve an instance of SrcMember from the managed object store by constructing its URI from the path...
Definition: SrcMember.hpp:258
bool isNameSet()
Check whether name has been set.
Definition: SrcMember.hpp:95
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: SrcMember.hpp:116
modelgbp::span::SrcMember & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: SrcMember.hpp:129
static void removeUnderPolicyUniversePlatformConfigSpanDstGrp(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &spanDstGrpName, const std::string &spanSrcMemberName)
Remove the SrcMember object with the specified path elements from the managed object store...
Definition: SrcMember.hpp:444
modelgbp::span::SrcMember & setDir(const uint8_t newValue)
Set dir to the specified value in the currently-active mutator.
Definition: SrcMember.hpp:73
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: SrcMember.hpp:104
boost::optional< const uint8_t > getDir()
Get the value of dir if it has been set.
Definition: SrcMember.hpp:48
static boost::optional< OF_SHARED_PTR< modelgbp::span::SrcMember > > resolveUnderPolicyUniversePlatformConfigSpanSrcGrp(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &spanSrcGrpName, const std::string &spanSrcMemberName)
Retrieve an instance of SrcMember from the managed object store by constructing its URI from the path...
Definition: SrcMember.hpp:202
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for SrcMember.
Definition: SrcMember.hpp:33
static void removeUnderPolicyUniversePlatformConfigSpanDstGrp(const std::string &platformConfigName, const std::string &spanDstGrpName, const std::string &spanSrcMemberName)
Remove the SrcMember object with the specified path elements from the managed object store using the ...
Definition: SrcMember.hpp:471
SrcMember(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of SrcMember.
Definition: SrcMember.hpp:545
OF_SHARED_PTR< modelgbp::span::MemberToRefRSrc > addSpanMemberToRefRSrc()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: SrcMember.hpp:319
static boost::optional< OF_SHARED_PTR< modelgbp::span::SrcMember > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SrcMember from the managed object store.
Definition: SrcMember.hpp:158
static boost::optional< OF_SHARED_PTR< modelgbp::span::MemberToRefRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of MemberToRefRSrc from the managed object store.
Definition: MemberToRefRSrc.hpp:297
static boost::optional< OF_SHARED_PTR< modelgbp::span::SrcMember > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of SrcMember from the managed object store using the default framework instance...
Definition: SrcMember.hpp:176
modelgbp::span::SrcMember & unsetName()
Unset name in the currently-active mutator.
Definition: SrcMember.hpp:141
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: SrcMember.hpp:490
static void removeUnderPolicyUniversePlatformConfigSpanSrcGrp(const std::string &platformConfigName, const std::string &spanSrcGrpName, const std::string &spanSrcMemberName)
Remove the SrcMember object with the specified path elements from the managed object store using the ...
Definition: SrcMember.hpp:418
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: SrcMember.hpp:521
static boost::optional< OF_SHARED_PTR< modelgbp::span::SrcMember > > resolveUnderPolicyUniversePlatformConfigSpanSrcGrp(const std::string &platformConfigName, const std::string &spanSrcGrpName, const std::string &spanSrcMemberName)
Retrieve an instance of SrcMember from the default managed object store by constructing its URI from ...
Definition: SrcMember.hpp:230