modelgbp Generated OpFlex Model 1.7.0
DstGrp.hpp
1
10#pragma once
11#ifndef GI_SPAN_DSTGRP_HPP
12#define GI_SPAN_DSTGRP_HPP
13
14#include <boost/optional.hpp>
15#include "opflex/modb/URIBuilder.h"
16#include "opflex/modb/mo-internal/MO.h"
17/*
18 * contains: item:mclass(span/SrcMember)
19 */
20#include "modelgbp/span/SrcMember.hpp"
21/*
22 * contains: item:mclass(span/DstMember)
23 */
24#include "modelgbp/span/DstMember.hpp"
25
26namespace modelgbp {
27namespace span {
28
29class DstGrp
30 : public opflex::modb::mointernal::MO
31{
32public:
33
37 static const opflex::modb::class_id_t CLASS_ID = 68;
38
43 bool isNameSet()
44 {
45 return getObjectInstance().isSet(2228225ul, opflex::modb::PropertyInfo::STRING);
46 }
47
52 boost::optional<const std::string&> getName()
53 {
54 if (isNameSet())
55 return getObjectInstance().getString(2228225ul);
56 return boost::none;
57 }
58
64 const std::string& getName(const std::string& defaultValue)
65 {
66 return getName().get_value_or(defaultValue);
67 }
68
77 modelgbp::span::DstGrp& setName(const std::string& newValue)
78 {
79 getTLMutator().modify(getClassId(), getURI())->setString(2228225ul, newValue);
80 return *this;
81 }
82
90 {
91 getTLMutator().modify(getClassId(), getURI())->unset(2228225ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
92 return *this;
93 }
94
106 static boost::optional<OF_SHARED_PTR<modelgbp::span::DstGrp> > resolve(
107 opflex::ofcore::OFFramework& framework,
108 const opflex::modb::URI& uri)
109 {
110 return opflex::modb::mointernal::MO::resolve<modelgbp::span::DstGrp>(framework, CLASS_ID, uri);
111 }
112
124 static boost::optional<OF_SHARED_PTR<modelgbp::span::DstGrp> > resolve(
125 const opflex::modb::URI& uri)
126 {
127 return opflex::modb::mointernal::MO::resolve<modelgbp::span::DstGrp>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
128 }
129
148 static boost::optional<OF_SHARED_PTR<modelgbp::span::DstGrp> > resolve(
149 opflex::ofcore::OFFramework& framework,
150 const std::string& platformConfigName,
151 const std::string& spanDstGrpName)
152 {
153 return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PlatformConfig").addElement(platformConfigName).addElement("SpanDstGrp").addElement(spanDstGrpName).build());
154 }
155
173 static boost::optional<OF_SHARED_PTR<modelgbp::span::DstGrp> > resolve(
174 const std::string& platformConfigName,
175 const std::string& spanDstGrpName)
176 {
177 return resolve(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,spanDstGrpName);
178 }
179
191 boost::optional<OF_SHARED_PTR<modelgbp::span::SrcMember> > resolveSpanSrcMember(
192 const std::string& spanSrcMemberName)
193 {
194 return modelgbp::span::SrcMember::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("SpanSrcMember").addElement(spanSrcMemberName).build());
195 }
196
209 OF_SHARED_PTR<modelgbp::span::SrcMember> addSpanSrcMember(
210 const std::string& spanSrcMemberName)
211 {
212 OF_SHARED_PTR<modelgbp::span::SrcMember> result = addChild<modelgbp::span::SrcMember>(
213 CLASS_ID, getURI(), 2149711949ul, 77,
214 opflex::modb::URIBuilder(getURI()).addElement("SpanSrcMember").addElement(spanSrcMemberName).build()
215 );
216 result->setName(spanSrcMemberName);
217 return result;
218 }
219
234 void resolveSpanSrcMember(/* out */ std::vector<OF_SHARED_PTR<modelgbp::span::SrcMember> >& out)
235 {
236 opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::SrcMember>(
237 getFramework(), CLASS_ID, getURI(), 2149711949ul, 77, out);
238 }
239
251 boost::optional<OF_SHARED_PTR<modelgbp::span::DstMember> > resolveSpanDstMember(
252 const std::string& spanDstMemberName)
253 {
254 return modelgbp::span::DstMember::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("SpanDstMember").addElement(spanDstMemberName).build());
255 }
256
269 OF_SHARED_PTR<modelgbp::span::DstMember> addSpanDstMember(
270 const std::string& spanDstMemberName)
271 {
272 OF_SHARED_PTR<modelgbp::span::DstMember> result = addChild<modelgbp::span::DstMember>(
273 CLASS_ID, getURI(), 2149711950ul, 78,
274 opflex::modb::URIBuilder(getURI()).addElement("SpanDstMember").addElement(spanDstMemberName).build()
275 );
276 result->setName(spanDstMemberName);
277 return result;
278 }
279
294 void resolveSpanDstMember(/* out */ std::vector<OF_SHARED_PTR<modelgbp::span::DstMember> >& out)
295 {
296 opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::DstMember>(
297 getFramework(), CLASS_ID, getURI(), 2149711950ul, 78, out);
298 }
299
308 void remove()
309 {
310 getTLMutator().remove(CLASS_ID, getURI());
311 }
312
323 static void remove(opflex::ofcore::OFFramework& framework,
324 const opflex::modb::URI& uri)
325 {
326 MO::remove(framework, CLASS_ID, uri);
327 }
328
339 static void remove(const opflex::modb::URI& uri)
340 {
341 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
342 }
343
360 static void remove(
361 opflex::ofcore::OFFramework& framework,
362 const std::string& platformConfigName,
363 const std::string& spanDstGrpName)
364 {
365 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PlatformConfig").addElement(platformConfigName).addElement("SpanDstGrp").addElement(spanDstGrpName).build());
366 }
367
384 static void remove(
385 const std::string& platformConfigName,
386 const std::string& spanDstGrpName)
387 {
388 remove(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,spanDstGrpName);
389 }
390
402 static void registerListener(
403 opflex::ofcore::OFFramework& framework,
404 opflex::modb::ObjectListener* listener)
405 {
406 opflex::modb::mointernal
407 ::MO::registerListener(framework, listener, CLASS_ID);
408 }
409
421 static void registerListener(
422 opflex::modb::ObjectListener* listener)
423 {
424 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
425 }
426
434 opflex::ofcore::OFFramework& framework,
435 opflex::modb::ObjectListener* listener)
436 {
437 opflex::modb::mointernal
438 ::MO::unregisterListener(framework, listener, CLASS_ID);
439 }
440
448 opflex::modb::ObjectListener* listener)
449 {
450 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
451 }
452
458 opflex::ofcore::OFFramework& framework,
459 const opflex::modb::URI& uri,
460 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
461 : MO(framework, CLASS_ID, uri, oi) { }
462}; // class DstGrp
463
464} // namespace span
465} // namespace modelgbp
466#endif // GI_SPAN_DSTGRP_HPP
Definition DstGrp.hpp:31
static boost::optional< OF_SHARED_PTR< modelgbp::span::DstGrp > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of DstGrp from the managed object store.
Definition DstGrp.hpp:106
modelgbp::span::DstGrp & unsetName()
Unset name in the currently-active mutator.
Definition DstGrp.hpp:89
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 DstGrp.hpp:421
OF_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 DstGrp.hpp:269
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the DstGrp object with the specified URI using the currently-active mutator.
Definition DstGrp.hpp:323
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 DstGrp.hpp:402
DstGrp(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of DstGrp.
Definition DstGrp.hpp:457
bool isNameSet()
Check whether name has been set.
Definition DstGrp.hpp:43
void resolveSpanDstMember(std::vector< OF_SHARED_PTR< modelgbp::span::DstMember > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::span::DstMember.
Definition DstGrp.hpp:294
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition DstGrp.hpp:64
OF_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 DstGrp.hpp:209
static void remove(const std::string &platformConfigName, const std::string &spanDstGrpName)
Remove the DstGrp object with the specified path elements from the managed object store using the def...
Definition DstGrp.hpp:384
static boost::optional< OF_SHARED_PTR< modelgbp::span::DstGrp > > resolve(const std::string &platformConfigName, const std::string &spanDstGrpName)
Retrieve an instance of DstGrp from the default managed object store by constructing its URI from the...
Definition DstGrp.hpp:173
static void remove(const opflex::modb::URI &uri)
Remove the DstGrp object with the specified URI using the currently-active mutator and the default fr...
Definition DstGrp.hpp:339
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition DstGrp.hpp:52
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition DstGrp.hpp:433
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for DstGrp.
Definition DstGrp.hpp:37
void remove()
Remove this instance using the currently-active mutator.
Definition DstGrp.hpp:308
static void remove(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &spanDstGrpName)
Remove the DstGrp object with the specified path elements from the managed object store.
Definition DstGrp.hpp:360
modelgbp::span::DstGrp & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition DstGrp.hpp:77
static boost::optional< OF_SHARED_PTR< modelgbp::span::DstGrp > > resolve(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &spanDstGrpName)
Retrieve an instance of DstGrp from the managed object store by constructing its URI from the path el...
Definition DstGrp.hpp:148
static boost::optional< OF_SHARED_PTR< modelgbp::span::DstGrp > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of DstGrp from the managed object store using the default framework instance.
Definition DstGrp.hpp:124
boost::optional< OF_SHARED_PTR< modelgbp::span::SrcMember > > resolveSpanSrcMember(const std::string &spanSrcMemberName)
Retrieve the child object with the specified naming properties.
Definition DstGrp.hpp:191
void resolveSpanSrcMember(std::vector< OF_SHARED_PTR< modelgbp::span::SrcMember > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::span::SrcMember.
Definition DstGrp.hpp:234
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition DstGrp.hpp:447
boost::optional< OF_SHARED_PTR< modelgbp::span::DstMember > > resolveSpanDstMember(const std::string &spanDstMemberName)
Retrieve the child object with the specified naming properties.
Definition DstGrp.hpp:251
static boost::optional< OF_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
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
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12