11 #ifndef GI_POLICY_UNIVERSE_HPP
12 #define GI_POLICY_UNIVERSE_HPP
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
20 #include "modelgbp/gbpe/EpgMapping.hpp"
24 #include "modelgbp/gbpe/IndirectEpgMapping.hpp"
28 #include "modelgbp/gbpe/MappingRuleSet.hpp"
32 #include "modelgbp/platform/Config.hpp"
36 #include "modelgbp/policy/Space.hpp"
42 :
public opflex::modb::mointernal::MO
49 static const opflex::modb::class_id_t
CLASS_ID = 223;
62 static boost::optional<OF_SHARED_PTR<modelgbp::policy::Universe> >
resolve(
63 opflex::ofcore::OFFramework& framework,
64 const opflex::modb::URI& uri)
66 return opflex::modb::mointernal::MO::resolve<modelgbp::policy::Universe>(framework,
CLASS_ID, uri);
80 static boost::optional<OF_SHARED_PTR<modelgbp::policy::Universe> >
resolve(
81 const opflex::modb::URI& uri)
83 return opflex::modb::mointernal::MO::resolve<modelgbp::policy::Universe>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
100 static boost::optional<OF_SHARED_PTR<modelgbp::policy::Universe> >
resolve(
101 opflex::ofcore::OFFramework& framework)
103 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").build());
119 static boost::optional<OF_SHARED_PTR<modelgbp::policy::Universe> >
resolve(
122 return resolve(opflex::ofcore::OFFramework::defaultInstance());
137 const std::string& gbpeEpgMappingName)
155 const std::string& gbpeEpgMappingName)
157 OF_SHARED_PTR<modelgbp::gbpe::EpgMapping> result = addChild<modelgbp::gbpe::EpgMapping>(
158 CLASS_ID, getURI(), 2154790922ul, 10,
159 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeEpgMapping").addElement(gbpeEpgMappingName).build()
161 result->setName(gbpeEpgMappingName);
181 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::EpgMapping>(
182 getFramework(),
CLASS_ID, getURI(), 2154790922ul, 10, out);
197 const std::string& gbpeIndirectEpgMappingName)
215 const std::string& gbpeIndirectEpgMappingName)
217 OF_SHARED_PTR<modelgbp::gbpe::IndirectEpgMapping> result = addChild<modelgbp::gbpe::IndirectEpgMapping>(
218 CLASS_ID, getURI(), 2154790926ul, 14,
219 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeIndirectEpgMapping").addElement(gbpeIndirectEpgMappingName).build()
221 result->setName(gbpeIndirectEpgMappingName);
241 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::IndirectEpgMapping>(
242 getFramework(),
CLASS_ID, getURI(), 2154790926ul, 14, out);
257 const std::string& gbpeMappingRuleSetName)
275 const std::string& gbpeMappingRuleSetName)
277 OF_SHARED_PTR<modelgbp::gbpe::MappingRuleSet> result = addChild<modelgbp::gbpe::MappingRuleSet>(
278 CLASS_ID, getURI(), 2154790940ul, 28,
279 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeMappingRuleSet").addElement(gbpeMappingRuleSetName).build()
281 result->setName(gbpeMappingRuleSetName);
301 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::MappingRuleSet>(
302 getFramework(),
CLASS_ID, getURI(), 2154790940ul, 28, out);
317 const std::string& platformConfigName)
335 const std::string& platformConfigName)
337 OF_SHARED_PTR<modelgbp::platform::Config> result = addChild<modelgbp::platform::Config>(
338 CLASS_ID, getURI(), 2154790963ul, 51,
339 opflex::modb::URIBuilder(getURI()).addElement(
"PlatformConfig").addElement(platformConfigName).build()
341 result->setName(platformConfigName);
361 opflex::modb::mointernal::MO::resolveChildren<modelgbp::platform::Config>(
362 getFramework(),
CLASS_ID, getURI(), 2154790963ul, 51, out);
377 const std::string& policySpaceName)
395 const std::string& policySpaceName)
397 OF_SHARED_PTR<modelgbp::policy::Space> result = addChild<modelgbp::policy::Space>(
398 CLASS_ID, getURI(), 2154791136ul, 224,
399 opflex::modb::URIBuilder(getURI()).addElement(
"PolicySpace").addElement(policySpaceName).build()
401 result->setName(policySpaceName);
421 opflex::modb::mointernal::MO::resolveChildren<modelgbp::policy::Space>(
422 getFramework(),
CLASS_ID, getURI(), 2154791136ul, 224, out);
435 getTLMutator().remove(
CLASS_ID, getURI());
448 static void remove(opflex::ofcore::OFFramework& framework,
449 const opflex::modb::URI& uri)
451 MO::remove(framework,
CLASS_ID, uri);
464 static void remove(
const opflex::modb::URI& uri)
466 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
481 opflex::ofcore::OFFramework& framework,
482 opflex::modb::ObjectListener* listener)
484 opflex::modb::mointernal
485 ::MO::registerListener(framework, listener,
CLASS_ID);
500 opflex::modb::ObjectListener* listener)
512 opflex::ofcore::OFFramework& framework,
513 opflex::modb::ObjectListener* listener)
515 opflex::modb::mointernal
516 ::MO::unregisterListener(framework, listener,
CLASS_ID);
526 opflex::modb::ObjectListener* listener)
536 opflex::ofcore::OFFramework& framework,
537 const opflex::modb::URI& uri,
538 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
539 : MO(framework,
CLASS_ID, uri, oi) { }
544 #endif // GI_POLICY_UNIVERSE_HPP
static boost::optional< OF_SHARED_PTR< modelgbp::policy::Universe > > resolve()
Retrieve an instance of Universe from the default managed object store by constructing its URI from t...
Definition: policy/Universe.hpp:119
static boost::optional< OF_SHARED_PTR< modelgbp::policy::Universe > > resolve(opflex::ofcore::OFFramework &framework)
Retrieve an instance of Universe from the managed object store by constructing its URI from the path ...
Definition: policy/Universe.hpp:100
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::MappingRuleSet > > resolveGbpeMappingRuleSet(const std::string &gbpeMappingRuleSetName)
Retrieve the child object with the specified naming properties.
Definition: policy/Universe.hpp:256
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::IndirectEpgMapping > > resolveGbpeIndirectEpgMapping(const std::string &gbpeIndirectEpgMappingName)
Retrieve the child object with the specified naming properties.
Definition: policy/Universe.hpp:196
static boost::optional< OF_SHARED_PTR< modelgbp::policy::Universe > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Universe from the managed object store.
Definition: policy/Universe.hpp:62
OF_SHARED_PTR< modelgbp::gbpe::MappingRuleSet > addGbpeMappingRuleSet(const std::string &gbpeMappingRuleSetName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: policy/Universe.hpp:274
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::IndirectEpgMapping > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of IndirectEpgMapping from the managed object store.
Definition: IndirectEpgMapping.hpp:110
void resolvePolicySpace(std::vector< OF_SHARED_PTR< modelgbp::policy::Space > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::policy::Space.
Definition: policy/Universe.hpp:419
boost::optional< OF_SHARED_PTR< modelgbp::platform::Config > > resolvePlatformConfig(const std::string &platformConfigName)
Retrieve the child object with the specified naming properties.
Definition: policy/Universe.hpp:316
void resolveGbpeIndirectEpgMapping(std::vector< OF_SHARED_PTR< modelgbp::gbpe::IndirectEpgMapping > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::IndirectEpgMapping.
Definition: policy/Universe.hpp:239
void resolveGbpeEpgMapping(std::vector< OF_SHARED_PTR< modelgbp::gbpe::EpgMapping > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::EpgMapping.
Definition: policy/Universe.hpp:179
void resolveGbpeMappingRuleSet(std::vector< OF_SHARED_PTR< modelgbp::gbpe::MappingRuleSet > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::MappingRuleSet.
Definition: policy/Universe.hpp:299
void resolvePlatformConfig(std::vector< OF_SHARED_PTR< modelgbp::platform::Config > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::platform::Config.
Definition: policy/Universe.hpp:359
OF_SHARED_PTR< modelgbp::platform::Config > addPlatformConfig(const std::string &platformConfigName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: policy/Universe.hpp:334
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Universe.
Definition: policy/Universe.hpp:49
OF_SHARED_PTR< modelgbp::gbpe::IndirectEpgMapping > addGbpeIndirectEpgMapping(const std::string &gbpeIndirectEpgMappingName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: policy/Universe.hpp:214
OF_SHARED_PTR< modelgbp::gbpe::EpgMapping > addGbpeEpgMapping(const std::string &gbpeEpgMappingName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: policy/Universe.hpp:154
Universe(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Universe.
Definition: policy/Universe.hpp:535
boost::optional< OF_SHARED_PTR< modelgbp::policy::Space > > resolvePolicySpace(const std::string &policySpaceName)
Retrieve the child object with the specified naming properties.
Definition: policy/Universe.hpp:376
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::EpgMapping > > resolveGbpeEpgMapping(const std::string &gbpeEpgMappingName)
Retrieve the child object with the specified naming properties.
Definition: policy/Universe.hpp:136
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: policy/Universe.hpp:480
static boost::optional< OF_SHARED_PTR< modelgbp::policy::Space > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Space from the managed object store.
Definition: Space.hpp:134
OF_SHARED_PTR< modelgbp::policy::Space > addPolicySpace(const std::string &policySpaceName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: policy/Universe.hpp:394
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
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: policy/Universe.hpp:499
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: policy/Universe.hpp:525
Definition: policy/Universe.hpp:41
static boost::optional< OF_SHARED_PTR< modelgbp::policy::Universe > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of Universe from the managed object store using the default framework instance...
Definition: policy/Universe.hpp:80
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: policy/Universe.hpp:511