modelgbp Generated OpFlex Model 1.7.0
MappingRuleSet.hpp
1
10#pragma once
11#ifndef GI_GBPE_MAPPINGRULESET_HPP
12#define GI_GBPE_MAPPINGRULESET_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/IndirectEpgMappingFromMappingRuleSetRTgt)
19 */
20#include "modelgbp/gbpe/IndirectEpgMappingFromMappingRuleSetRTgt.hpp"
21/*
22 * contains: item:mclass(gbpe/AttributeMappingRule)
23 */
24#include "modelgbp/gbpe/AttributeMappingRule.hpp"
25
26namespace modelgbp {
27namespace gbpe {
28
30 : public opflex::modb::mointernal::MO
31{
32public:
33
37 static const opflex::modb::class_id_t CLASS_ID = 28;
38
43 bool isNameSet()
44 {
45 return getObjectInstance().isSet(917505ul, opflex::modb::PropertyInfo::STRING);
46 }
47
52 boost::optional<const std::string&> getName()
53 {
54 if (isNameSet())
55 return getObjectInstance().getString(917505ul);
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::gbpe::MappingRuleSet& setName(const std::string& newValue)
78 {
79 getTLMutator().modify(getClassId(), getURI())->setString(917505ul, newValue);
80 return *this;
81 }
82
90 {
91 getTLMutator().modify(getClassId(), getURI())->unset(917505ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
92 return *this;
93 }
94
106 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::MappingRuleSet> > resolve(
107 opflex::ofcore::OFFramework& framework,
108 const opflex::modb::URI& uri)
109 {
110 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::MappingRuleSet>(framework, CLASS_ID, uri);
111 }
112
124 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::MappingRuleSet> > resolve(
125 const opflex::modb::URI& uri)
126 {
127 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::MappingRuleSet>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
128 }
129
146 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::MappingRuleSet> > resolve(
147 opflex::ofcore::OFFramework& framework,
148 const std::string& gbpeMappingRuleSetName)
149 {
150 return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("GbpeMappingRuleSet").addElement(gbpeMappingRuleSetName).build());
151 }
152
168 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::MappingRuleSet> > resolve(
169 const std::string& gbpeMappingRuleSetName)
170 {
171 return resolve(opflex::ofcore::OFFramework::defaultInstance(),gbpeMappingRuleSetName);
172 }
173
185 boost::optional<OF_SHARED_PTR<modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt> > resolveGbpeIndirectEpgMappingFromMappingRuleSetRTgt(
186 const std::string& gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource)
187 {
188 return modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeIndirectEpgMappingFromMappingRuleSetRTgt").addElement(gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource).build());
189 }
190
203 OF_SHARED_PTR<modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt> addGbpeIndirectEpgMappingFromMappingRuleSetRTgt(
204 const std::string& gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource)
205 {
206 OF_SHARED_PTR<modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt> result = addChild<modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt>(
207 CLASS_ID, getURI(), 2148401171ul, 19,
208 opflex::modb::URIBuilder(getURI()).addElement("GbpeIndirectEpgMappingFromMappingRuleSetRTgt").addElement(gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource).build()
209 );
210 result->setSource(gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource);
211 return result;
212 }
213
228 void resolveGbpeIndirectEpgMappingFromMappingRuleSetRTgt(/* out */ std::vector<OF_SHARED_PTR<modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt> >& out)
229 {
230 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt>(
231 getFramework(), CLASS_ID, getURI(), 2148401171ul, 19, out);
232 }
233
245 boost::optional<OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> > resolveGbpeAttributeMappingRule(
246 const std::string& gbpeAttributeMappingRuleName)
247 {
248 return modelgbp::gbpe::AttributeMappingRule::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeAttributeMappingRule").addElement(gbpeAttributeMappingRuleName).build());
249 }
250
263 OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> addGbpeAttributeMappingRule(
264 const std::string& gbpeAttributeMappingRuleName)
265 {
266 OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> result = addChild<modelgbp::gbpe::AttributeMappingRule>(
267 CLASS_ID, getURI(), 2148401185ul, 33,
268 opflex::modb::URIBuilder(getURI()).addElement("GbpeAttributeMappingRule").addElement(gbpeAttributeMappingRuleName).build()
269 );
270 result->setName(gbpeAttributeMappingRuleName);
271 return result;
272 }
273
288 void resolveGbpeAttributeMappingRule(/* out */ std::vector<OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> >& out)
289 {
290 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::AttributeMappingRule>(
291 getFramework(), CLASS_ID, getURI(), 2148401185ul, 33, out);
292 }
293
302 void remove()
303 {
304 getTLMutator().remove(CLASS_ID, getURI());
305 }
306
317 static void remove(opflex::ofcore::OFFramework& framework,
318 const opflex::modb::URI& uri)
319 {
320 MO::remove(framework, CLASS_ID, uri);
321 }
322
333 static void remove(const opflex::modb::URI& uri)
334 {
335 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
336 }
337
352 static void remove(
353 opflex::ofcore::OFFramework& framework,
354 const std::string& gbpeMappingRuleSetName)
355 {
356 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("GbpeMappingRuleSet").addElement(gbpeMappingRuleSetName).build());
357 }
358
373 static void remove(
374 const std::string& gbpeMappingRuleSetName)
375 {
376 remove(opflex::ofcore::OFFramework::defaultInstance(),gbpeMappingRuleSetName);
377 }
378
390 static void registerListener(
391 opflex::ofcore::OFFramework& framework,
392 opflex::modb::ObjectListener* listener)
393 {
394 opflex::modb::mointernal
395 ::MO::registerListener(framework, listener, CLASS_ID);
396 }
397
409 static void registerListener(
410 opflex::modb::ObjectListener* listener)
411 {
412 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
413 }
414
422 opflex::ofcore::OFFramework& framework,
423 opflex::modb::ObjectListener* listener)
424 {
425 opflex::modb::mointernal
426 ::MO::unregisterListener(framework, listener, CLASS_ID);
427 }
428
436 opflex::modb::ObjectListener* listener)
437 {
438 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
439 }
440
446 opflex::ofcore::OFFramework& framework,
447 const opflex::modb::URI& uri,
448 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
449 : MO(framework, CLASS_ID, uri, oi) { }
450}; // class MappingRuleSet
451
452} // namespace gbpe
453} // namespace modelgbp
454#endif // GI_GBPE_MAPPINGRULESET_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::IndirectEpgMappingFromMappingRuleSetRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of IndirectEpgMappingFromMappingRuleSetRTgt from the managed object store.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:210
Definition MappingRuleSet.hpp:31
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition MappingRuleSet.hpp:64
static void remove(const opflex::modb::URI &uri)
Remove the MappingRuleSet object with the specified URI using the currently-active mutator and the de...
Definition MappingRuleSet.hpp:333
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::MappingRuleSet > > resolve(opflex::ofcore::OFFramework &framework, const std::string &gbpeMappingRuleSetName)
Retrieve an instance of MappingRuleSet from the managed object store by constructing its URI from the...
Definition MappingRuleSet.hpp:146
bool isNameSet()
Check whether name has been set.
Definition MappingRuleSet.hpp:43
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 MappingRuleSet.hpp:409
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::MappingRuleSet > > resolve(const std::string &gbpeMappingRuleSetName)
Retrieve an instance of MappingRuleSet from the default managed object store by constructing its URI ...
Definition MappingRuleSet.hpp:168
static void remove(const std::string &gbpeMappingRuleSetName)
Remove the MappingRuleSet object with the specified path elements from the managed object store using...
Definition MappingRuleSet.hpp:373
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::MappingRuleSet > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of MappingRuleSet from the managed object store using the default framework inst...
Definition MappingRuleSet.hpp:124
MappingRuleSet(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of MappingRuleSet.
Definition MappingRuleSet.hpp:445
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 MappingRuleSet.hpp:288
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition MappingRuleSet.hpp:52
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition MappingRuleSet.hpp:421
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 MappingRuleSet.hpp:390
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the MappingRuleSet object with the specified URI using the currently-active mutator.
Definition MappingRuleSet.hpp:317
modelgbp::gbpe::MappingRuleSet & unsetName()
Unset name in the currently-active mutator.
Definition MappingRuleSet.hpp:89
void resolveGbpeIndirectEpgMappingFromMappingRuleSetRTgt(std::vector< OF_SHARED_PTR< modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::IndirectEpgMappingFromMapp...
Definition MappingRuleSet.hpp:228
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for MappingRuleSet.
Definition MappingRuleSet.hpp:37
modelgbp::gbpe::MappingRuleSet & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition MappingRuleSet.hpp:77
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition MappingRuleSet.hpp:435
void remove()
Remove this instance using the currently-active mutator.
Definition MappingRuleSet.hpp:302
static void remove(opflex::ofcore::OFFramework &framework, const std::string &gbpeMappingRuleSetName)
Remove the MappingRuleSet object with the specified path elements from the managed object store.
Definition MappingRuleSet.hpp:352
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 MappingRuleSet.hpp:263
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::AttributeMappingRule > > resolveGbpeAttributeMappingRule(const std::string &gbpeAttributeMappingRuleName)
Retrieve the child object with the specified naming properties.
Definition MappingRuleSet.hpp:245
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::MappingRuleSet > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of MappingRuleSet from the managed object store.
Definition MappingRuleSet.hpp:106
OF_SHARED_PTR< modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt > addGbpeIndirectEpgMappingFromMappingRuleSetRTgt(const std::string &gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition MappingRuleSet.hpp:203
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt > > resolveGbpeIndirectEpgMappingFromMappingRuleSetRTgt(const std::string &gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource)
Retrieve the child object with the specified naming properties.
Definition MappingRuleSet.hpp:185
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12