modelgbp Generated OpFlex Model 1.7.0
EpgMapping.hpp
1
10#pragma once
11#ifndef GI_GBPE_EPGMAPPING_HPP
12#define GI_GBPE_EPGMAPPING_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(gbpe/EpgMappingToDefaultGroupRSrc)
19 */
20#include "modelgbp/gbpe/EpgMappingToDefaultGroupRSrc.hpp"
21/*
22 * contains: item:mclass(gbpe/EpgMappingCtxFromEpgMappingRTgt)
23 */
24#include "modelgbp/gbpe/EpgMappingCtxFromEpgMappingRTgt.hpp"
25/*
26 * contains: item:mclass(gbpe/AttributeMappingRule)
27 */
28#include "modelgbp/gbpe/AttributeMappingRule.hpp"
29
30namespace modelgbp {
31namespace gbpe {
32
34 : public opflex::modb::mointernal::MO
35{
36public:
37
41 static const opflex::modb::class_id_t CLASS_ID = 10;
42
47 bool isNameSet()
48 {
49 return getObjectInstance().isSet(327681ul, opflex::modb::PropertyInfo::STRING);
50 }
51
56 boost::optional<const std::string&> getName()
57 {
58 if (isNameSet())
59 return getObjectInstance().getString(327681ul);
60 return boost::none;
61 }
62
68 const std::string& getName(const std::string& defaultValue)
69 {
70 return getName().get_value_or(defaultValue);
71 }
72
81 modelgbp::gbpe::EpgMapping& setName(const std::string& newValue)
82 {
83 getTLMutator().modify(getClassId(), getURI())->setString(327681ul, newValue);
84 return *this;
85 }
86
94 {
95 getTLMutator().modify(getClassId(), getURI())->unset(327681ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
96 return *this;
97 }
98
110 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMapping> > resolve(
111 opflex::ofcore::OFFramework& framework,
112 const opflex::modb::URI& uri)
113 {
114 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::EpgMapping>(framework, CLASS_ID, uri);
115 }
116
128 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMapping> > resolve(
129 const opflex::modb::URI& uri)
130 {
131 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::EpgMapping>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
132 }
133
150 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMapping> > resolve(
151 opflex::ofcore::OFFramework& framework,
152 const std::string& gbpeEpgMappingName)
153 {
154 return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("GbpeEpgMapping").addElement(gbpeEpgMappingName).build());
155 }
156
172 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMapping> > resolve(
173 const std::string& gbpeEpgMappingName)
174 {
175 return resolve(opflex::ofcore::OFFramework::defaultInstance(),gbpeEpgMappingName);
176 }
177
187 boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMappingToDefaultGroupRSrc> > resolveGbpeEpgMappingToDefaultGroupRSrc(
188 )
189 {
190 return modelgbp::gbpe::EpgMappingToDefaultGroupRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeEpgMappingToDefaultGroupRSrc").build());
191 }
192
203 OF_SHARED_PTR<modelgbp::gbpe::EpgMappingToDefaultGroupRSrc> addGbpeEpgMappingToDefaultGroupRSrc(
204 )
205 {
206 OF_SHARED_PTR<modelgbp::gbpe::EpgMappingToDefaultGroupRSrc> result = addChild<modelgbp::gbpe::EpgMappingToDefaultGroupRSrc>(
207 CLASS_ID, getURI(), 2147811339ul, 11,
208 opflex::modb::URIBuilder(getURI()).addElement("GbpeEpgMappingToDefaultGroupRSrc").build()
209 );
210 return result;
211 }
212
224 boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtxFromEpgMappingRTgt> > resolveGbpeEpgMappingCtxFromEpgMappingRTgt(
225 const std::string& gbpeEpgMappingCtxFromEpgMappingRTgtSource)
226 {
227 return modelgbp::gbpe::EpgMappingCtxFromEpgMappingRTgt::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeEpgMappingCtxFromEpgMappingRTgt").addElement(gbpeEpgMappingCtxFromEpgMappingRTgtSource).build());
228 }
229
242 OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtxFromEpgMappingRTgt> addGbpeEpgMappingCtxFromEpgMappingRTgt(
243 const std::string& gbpeEpgMappingCtxFromEpgMappingRTgtSource)
244 {
245 OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtxFromEpgMappingRTgt> result = addChild<modelgbp::gbpe::EpgMappingCtxFromEpgMappingRTgt>(
246 CLASS_ID, getURI(), 2147811351ul, 23,
247 opflex::modb::URIBuilder(getURI()).addElement("GbpeEpgMappingCtxFromEpgMappingRTgt").addElement(gbpeEpgMappingCtxFromEpgMappingRTgtSource).build()
248 );
249 result->setSource(gbpeEpgMappingCtxFromEpgMappingRTgtSource);
250 return result;
251 }
252
267 void resolveGbpeEpgMappingCtxFromEpgMappingRTgt(/* out */ std::vector<OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtxFromEpgMappingRTgt> >& out)
268 {
269 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::EpgMappingCtxFromEpgMappingRTgt>(
270 getFramework(), CLASS_ID, getURI(), 2147811351ul, 23, out);
271 }
272
284 boost::optional<OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> > resolveGbpeAttributeMappingRule(
285 const std::string& gbpeAttributeMappingRuleName)
286 {
287 return modelgbp::gbpe::AttributeMappingRule::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeAttributeMappingRule").addElement(gbpeAttributeMappingRuleName).build());
288 }
289
302 OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> addGbpeAttributeMappingRule(
303 const std::string& gbpeAttributeMappingRuleName)
304 {
305 OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> result = addChild<modelgbp::gbpe::AttributeMappingRule>(
306 CLASS_ID, getURI(), 2147811361ul, 33,
307 opflex::modb::URIBuilder(getURI()).addElement("GbpeAttributeMappingRule").addElement(gbpeAttributeMappingRuleName).build()
308 );
309 result->setName(gbpeAttributeMappingRuleName);
310 return result;
311 }
312
327 void resolveGbpeAttributeMappingRule(/* out */ std::vector<OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> >& out)
328 {
329 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::AttributeMappingRule>(
330 getFramework(), CLASS_ID, getURI(), 2147811361ul, 33, out);
331 }
332
341 void remove()
342 {
343 getTLMutator().remove(CLASS_ID, getURI());
344 }
345
356 static void remove(opflex::ofcore::OFFramework& framework,
357 const opflex::modb::URI& uri)
358 {
359 MO::remove(framework, CLASS_ID, uri);
360 }
361
372 static void remove(const opflex::modb::URI& uri)
373 {
374 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
375 }
376
391 static void remove(
392 opflex::ofcore::OFFramework& framework,
393 const std::string& gbpeEpgMappingName)
394 {
395 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("GbpeEpgMapping").addElement(gbpeEpgMappingName).build());
396 }
397
412 static void remove(
413 const std::string& gbpeEpgMappingName)
414 {
415 remove(opflex::ofcore::OFFramework::defaultInstance(),gbpeEpgMappingName);
416 }
417
429 static void registerListener(
430 opflex::ofcore::OFFramework& framework,
431 opflex::modb::ObjectListener* listener)
432 {
433 opflex::modb::mointernal
434 ::MO::registerListener(framework, listener, CLASS_ID);
435 }
436
448 static void registerListener(
449 opflex::modb::ObjectListener* listener)
450 {
451 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
452 }
453
461 opflex::ofcore::OFFramework& framework,
462 opflex::modb::ObjectListener* listener)
463 {
464 opflex::modb::mointernal
465 ::MO::unregisterListener(framework, listener, CLASS_ID);
466 }
467
475 opflex::modb::ObjectListener* listener)
476 {
477 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
478 }
479
485 opflex::ofcore::OFFramework& framework,
486 const opflex::modb::URI& uri,
487 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
488 : MO(framework, CLASS_ID, uri, oi) { }
489}; // class EpgMapping
490
491} // namespace gbpe
492} // namespace modelgbp
493#endif // GI_GBPE_EPGMAPPING_HPP
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::AttributeMappingRule > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of AttributeMappingRule from the managed object store.
Definition AttributeMappingRule.hpp:382
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtxFromEpgMappingRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpgMappingCtxFromEpgMappingRTgt from the managed object store.
Definition EpgMappingCtxFromEpgMappingRTgt.hpp:210
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingToDefaultGroupRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpgMappingToDefaultGroupRSrc from the managed object store.
Definition EpgMappingToDefaultGroupRSrc.hpp:257
Definition EpgMapping.hpp:35
OF_SHARED_PTR< modelgbp::gbpe::EpgMappingToDefaultGroupRSrc > addGbpeEpgMappingToDefaultGroupRSrc()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition EpgMapping.hpp:203
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 EpgMapping.hpp:448
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 EpgMapping.hpp:429
OF_SHARED_PTR< modelgbp::gbpe::AttributeMappingRule > addGbpeAttributeMappingRule(const std::string &gbpeAttributeMappingRuleName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition EpgMapping.hpp:302
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMapping > > resolve(opflex::ofcore::OFFramework &framework, const std::string &gbpeEpgMappingName)
Retrieve an instance of EpgMapping from the managed object store by constructing its URI from the pat...
Definition EpgMapping.hpp:150
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition EpgMapping.hpp:460
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMapping > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpgMapping from the managed object store.
Definition EpgMapping.hpp:110
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::AttributeMappingRule > > resolveGbpeAttributeMappingRule(const std::string &gbpeAttributeMappingRuleName)
Retrieve the child object with the specified naming properties.
Definition EpgMapping.hpp:284
static void remove(opflex::ofcore::OFFramework &framework, const std::string &gbpeEpgMappingName)
Remove the EpgMapping object with the specified path elements from the managed object store.
Definition EpgMapping.hpp:391
static void remove(const opflex::modb::URI &uri)
Remove the EpgMapping object with the specified URI using the currently-active mutator and the defaul...
Definition EpgMapping.hpp:372
bool isNameSet()
Check whether name has been set.
Definition EpgMapping.hpp:47
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition EpgMapping.hpp:56
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition EpgMapping.hpp:474
modelgbp::gbpe::EpgMapping & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition EpgMapping.hpp:81
void resolveGbpeAttributeMappingRule(std::vector< OF_SHARED_PTR< modelgbp::gbpe::AttributeMappingRule > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::AttributeMappingRule.
Definition EpgMapping.hpp:327
EpgMapping(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of EpgMapping.
Definition EpgMapping.hpp:484
void resolveGbpeEpgMappingCtxFromEpgMappingRTgt(std::vector< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtxFromEpgMappingRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::EpgMappingCtxFromEpgMappin...
Definition EpgMapping.hpp:267
OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtxFromEpgMappingRTgt > addGbpeEpgMappingCtxFromEpgMappingRTgt(const std::string &gbpeEpgMappingCtxFromEpgMappingRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition EpgMapping.hpp:242
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingToDefaultGroupRSrc > > resolveGbpeEpgMappingToDefaultGroupRSrc()
Retrieve the child object with the specified naming properties.
Definition EpgMapping.hpp:187
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMapping > > resolve(const std::string &gbpeEpgMappingName)
Retrieve an instance of EpgMapping from the default managed object store by constructing its URI from...
Definition EpgMapping.hpp:172
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtxFromEpgMappingRTgt > > resolveGbpeEpgMappingCtxFromEpgMappingRTgt(const std::string &gbpeEpgMappingCtxFromEpgMappingRTgtSource)
Retrieve the child object with the specified naming properties.
Definition EpgMapping.hpp:224
modelgbp::gbpe::EpgMapping & unsetName()
Unset name in the currently-active mutator.
Definition EpgMapping.hpp:93
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the EpgMapping object with the specified URI using the currently-active mutator.
Definition EpgMapping.hpp:356
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for EpgMapping.
Definition EpgMapping.hpp:41
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition EpgMapping.hpp:68
void remove()
Remove this instance using the currently-active mutator.
Definition EpgMapping.hpp:341
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMapping > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of EpgMapping from the managed object store using the default framework instance...
Definition EpgMapping.hpp:128
static void remove(const std::string &gbpeEpgMappingName)
Remove the EpgMapping object with the specified path elements from the managed object store using the...
Definition EpgMapping.hpp:412
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12