11 #ifndef GI_SPAN_SRCGRP_HPP
12 #define GI_SPAN_SRCGRP_HPP
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
20 #include "modelgbp/span/SrcMember.hpp"
24 #include "modelgbp/span/DstMember.hpp"
30 :
public opflex::modb::mointernal::MO
37 static const opflex::modb::class_id_t
CLASS_ID = 50;
45 return getObjectInstance().isSet(1638403ul, opflex::modb::PropertyInfo::U64);
55 return (uint32_t)getObjectInstance().getUInt64(1638403ul);
66 return getLabel().get_value_or(defaultValue);
79 getTLMutator().modify(getClassId(), getURI())->setUInt64(1638403ul, newValue);
91 getTLMutator().modify(getClassId(), getURI())->unset(1638403ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
101 return getObjectInstance().isSet(1638401ul, opflex::modb::PropertyInfo::STRING);
111 return getObjectInstance().getString(1638401ul);
120 const std::string&
getName(
const std::string& defaultValue)
122 return getName().get_value_or(defaultValue);
135 getTLMutator().modify(getClassId(), getURI())->setString(1638401ul, newValue);
147 getTLMutator().modify(getClassId(), getURI())->unset(1638401ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
157 return getObjectInstance().isSet(1638402ul, opflex::modb::PropertyInfo::ENUM8);
167 return (
const uint8_t)getObjectInstance().getUInt64(1638402ul);
178 return getState().get_value_or(defaultValue);
191 getTLMutator().modify(getClassId(), getURI())->setUInt64(1638402ul, newValue);
203 getTLMutator().modify(getClassId(), getURI())->unset(1638402ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
218 static boost::optional<boost::shared_ptr<modelgbp::span::SrcGrp> >
resolve(
219 opflex::ofcore::OFFramework& framework,
220 const opflex::modb::URI& uri)
222 return opflex::modb::mointernal::MO::resolve<modelgbp::span::SrcGrp>(framework,
CLASS_ID, uri);
236 static boost::optional<boost::shared_ptr<modelgbp::span::SrcGrp> >
resolve(
237 const opflex::modb::URI& uri)
239 return opflex::modb::mointernal::MO::resolve<modelgbp::span::SrcGrp>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
260 static boost::optional<boost::shared_ptr<modelgbp::span::SrcGrp> >
resolve(
261 opflex::ofcore::OFFramework& framework,
262 const std::string& platformConfigName,
263 const std::string& spanSrcGrpName)
265 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).addElement(
"SpanSrcGrp").addElement(spanSrcGrpName).build());
285 static boost::optional<boost::shared_ptr<modelgbp::span::SrcGrp> >
resolve(
286 const std::string& platformConfigName,
287 const std::string& spanSrcGrpName)
289 return resolve(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,spanSrcGrpName);
304 const std::string& spanSrcMemberName)
322 const std::string& spanSrcMemberName)
324 boost::shared_ptr<modelgbp::span::SrcMember> result = addChild<modelgbp::span::SrcMember>(
325 CLASS_ID, getURI(), 2149122108ul, 60,
326 opflex::modb::URIBuilder(getURI()).addElement(
"SpanSrcMember").addElement(spanSrcMemberName).build()
328 result->setName(spanSrcMemberName);
348 opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::SrcMember>(
349 getFramework(),
CLASS_ID, getURI(), 2149122108ul, 60, out);
364 const std::string& spanDstMemberName)
382 const std::string& spanDstMemberName)
384 boost::shared_ptr<modelgbp::span::DstMember> result = addChild<modelgbp::span::DstMember>(
385 CLASS_ID, getURI(), 2149122109ul, 61,
386 opflex::modb::URIBuilder(getURI()).addElement(
"SpanDstMember").addElement(spanDstMemberName).build()
388 result->setName(spanDstMemberName);
408 opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::DstMember>(
409 getFramework(),
CLASS_ID, getURI(), 2149122109ul, 61, out);
422 getTLMutator().remove(
CLASS_ID, getURI());
435 static void remove(opflex::ofcore::OFFramework& framework,
436 const opflex::modb::URI& uri)
438 MO::remove(framework,
CLASS_ID, uri);
451 static void remove(
const opflex::modb::URI& uri)
453 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
473 opflex::ofcore::OFFramework& framework,
474 const std::string& platformConfigName,
475 const std::string& spanSrcGrpName)
477 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).addElement(
"SpanSrcGrp").addElement(spanSrcGrpName).build());
497 const std::string& platformConfigName,
498 const std::string& spanSrcGrpName)
500 remove(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,spanSrcGrpName);
515 opflex::ofcore::OFFramework& framework,
516 opflex::modb::ObjectListener* listener)
518 opflex::modb::mointernal
519 ::MO::registerListener(framework, listener,
CLASS_ID);
534 opflex::modb::ObjectListener* listener)
546 opflex::ofcore::OFFramework& framework,
547 opflex::modb::ObjectListener* listener)
549 opflex::modb::mointernal
550 ::MO::unregisterListener(framework, listener,
CLASS_ID);
560 opflex::modb::ObjectListener* listener)
570 opflex::ofcore::OFFramework& framework,
571 const opflex::modb::URI& uri,
572 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
573 : MO(framework,
CLASS_ID, uri, oi) { }
578 #endif // GI_SPAN_SRCGRP_HPP
bool isLabelSet()
Check whether label has been set.
Definition: SrcGrp.hpp:43
static boost::optional< boost::shared_ptr< modelgbp::span::SrcGrp > > resolve(const std::string &platformConfigName, const std::string &spanSrcGrpName)
Retrieve an instance of SrcGrp from the default managed object store by constructing its URI from the...
Definition: SrcGrp.hpp:285
bool isStateSet()
Check whether state has been set.
Definition: SrcGrp.hpp:155
const uint8_t getState(const uint8_t defaultValue)
Get the value of state if set, otherwise the value of default passed in.
Definition: SrcGrp.hpp:176
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: SrcGrp.hpp:514
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for SrcGrp.
Definition: SrcGrp.hpp:37
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: SrcGrp.hpp:120
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: SrcGrp.hpp:559
boost::optional< uint32_t > getLabel()
Get the value of label if it has been set.
Definition: SrcGrp.hpp:52
modelgbp::span::SrcGrp & unsetName()
Unset name in the currently-active mutator.
Definition: SrcGrp.hpp:145
modelgbp::span::SrcGrp & unsetLabel()
Unset label in the currently-active mutator.
Definition: SrcGrp.hpp:89
boost::optional< boost::shared_ptr< modelgbp::span::DstMember > > resolveSpanDstMember(const std::string &spanDstMemberName)
Retrieve the child object with the specified naming properties.
Definition: SrcGrp.hpp:363
void resolveSpanDstMember(std::vector< boost::shared_ptr< modelgbp::span::DstMember > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::span::DstMember.
Definition: SrcGrp.hpp:406
static boost::optional< boost::shared_ptr< modelgbp::span::SrcGrp > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SrcGrp from the managed object store.
Definition: SrcGrp.hpp:218
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: SrcGrp.hpp:108
boost::optional< const uint8_t > getState()
Get the value of state if it has been set.
Definition: SrcGrp.hpp:164
boost::shared_ptr< modelgbp::span::DstMember > addSpanDstMember(const std::string &spanDstMemberName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: SrcGrp.hpp:381
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: SrcGrp.hpp:545
Definition: SrcGrp.hpp:29
static boost::optional< boost::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
bool isNameSet()
Check whether name has been set.
Definition: SrcGrp.hpp:99
modelgbp::span::SrcGrp & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: SrcGrp.hpp:133
modelgbp::span::SrcGrp & setLabel(uint32_t newValue)
Set label to the specified value in the currently-active mutator.
Definition: SrcGrp.hpp:77
boost::shared_ptr< modelgbp::span::SrcMember > addSpanSrcMember(const std::string &spanSrcMemberName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: SrcGrp.hpp:321
static boost::optional< boost::shared_ptr< modelgbp::span::DstMember > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of DstMember from the managed object store.
Definition: DstMember.hpp:106
modelgbp::span::SrcGrp & setState(const uint8_t newValue)
Set state to the specified value in the currently-active mutator.
Definition: SrcGrp.hpp:189
modelgbp::span::SrcGrp & unsetState()
Unset state in the currently-active mutator.
Definition: SrcGrp.hpp:201
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: SrcGrp.hpp:533
static boost::optional< boost::shared_ptr< modelgbp::span::SrcGrp > > resolve(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &spanSrcGrpName)
Retrieve an instance of SrcGrp from the managed object store by constructing its URI from the path el...
Definition: SrcGrp.hpp:260
uint32_t getLabel(uint32_t defaultValue)
Get the value of label if set, otherwise the value of default passed in.
Definition: SrcGrp.hpp:64
void resolveSpanSrcMember(std::vector< boost::shared_ptr< modelgbp::span::SrcMember > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::span::SrcMember.
Definition: SrcGrp.hpp:346
static boost::optional< boost::shared_ptr< modelgbp::span::SrcGrp > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of SrcGrp from the managed object store using the default framework instance...
Definition: SrcGrp.hpp:236
boost::optional< boost::shared_ptr< modelgbp::span::SrcMember > > resolveSpanSrcMember(const std::string &spanSrcMemberName)
Retrieve the child object with the specified naming properties.
Definition: SrcGrp.hpp:303
SrcGrp(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of SrcGrp.
Definition: SrcGrp.hpp:569