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/platform/Config.hpp"
28 #include "modelgbp/policy/Space.hpp"
34 :
public opflex::modb::mointernal::MO
41 static const opflex::modb::class_id_t
CLASS_ID = 178;
54 static boost::optional<boost::shared_ptr<modelgbp::policy::Universe> >
resolve(
55 opflex::ofcore::OFFramework& framework,
56 const opflex::modb::URI& uri)
58 return opflex::modb::mointernal::MO::resolve<modelgbp::policy::Universe>(framework,
CLASS_ID, uri);
72 static boost::optional<boost::shared_ptr<modelgbp::policy::Universe> >
resolve(
73 const opflex::modb::URI& uri)
75 return opflex::modb::mointernal::MO::resolve<modelgbp::policy::Universe>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
92 static boost::optional<boost::shared_ptr<modelgbp::policy::Universe> >
resolve(
93 opflex::ofcore::OFFramework& framework)
95 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").build());
111 static boost::optional<boost::shared_ptr<modelgbp::policy::Universe> >
resolve(
114 return resolve(opflex::ofcore::OFFramework::defaultInstance());
129 const std::string& gbpeEpgMappingName)
147 const std::string& gbpeEpgMappingName)
149 boost::shared_ptr<modelgbp::gbpe::EpgMapping> result = addChild<modelgbp::gbpe::EpgMapping>(
150 CLASS_ID, getURI(), 2153316361ul, 9,
151 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeEpgMapping").addElement(gbpeEpgMappingName).build()
153 result->setName(gbpeEpgMappingName);
173 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::EpgMapping>(
174 getFramework(),
CLASS_ID, getURI(), 2153316361ul, 9, out);
189 const std::string& platformConfigName)
207 const std::string& platformConfigName)
209 boost::shared_ptr<modelgbp::platform::Config> result = addChild<modelgbp::platform::Config>(
210 CLASS_ID, getURI(), 2153316389ul, 37,
211 opflex::modb::URIBuilder(getURI()).addElement(
"PlatformConfig").addElement(platformConfigName).build()
213 result->setName(platformConfigName);
233 opflex::modb::mointernal::MO::resolveChildren<modelgbp::platform::Config>(
234 getFramework(),
CLASS_ID, getURI(), 2153316389ul, 37, out);
249 const std::string& policySpaceName)
267 const std::string& policySpaceName)
269 boost::shared_ptr<modelgbp::policy::Space> result = addChild<modelgbp::policy::Space>(
270 CLASS_ID, getURI(), 2153316531ul, 179,
271 opflex::modb::URIBuilder(getURI()).addElement(
"PolicySpace").addElement(policySpaceName).build()
273 result->setName(policySpaceName);
293 opflex::modb::mointernal::MO::resolveChildren<modelgbp::policy::Space>(
294 getFramework(),
CLASS_ID, getURI(), 2153316531ul, 179, out);
307 getTLMutator().remove(
CLASS_ID, getURI());
320 static void remove(opflex::ofcore::OFFramework& framework,
321 const opflex::modb::URI& uri)
323 MO::remove(framework,
CLASS_ID, uri);
336 static void remove(
const opflex::modb::URI& uri)
338 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
353 opflex::ofcore::OFFramework& framework,
354 opflex::modb::ObjectListener* listener)
356 opflex::modb::mointernal
357 ::MO::registerListener(framework, listener,
CLASS_ID);
372 opflex::modb::ObjectListener* listener)
384 opflex::ofcore::OFFramework& framework,
385 opflex::modb::ObjectListener* listener)
387 opflex::modb::mointernal
388 ::MO::unregisterListener(framework, listener,
CLASS_ID);
398 opflex::modb::ObjectListener* listener)
408 opflex::ofcore::OFFramework& framework,
409 const opflex::modb::URI& uri,
410 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
411 : MO(framework,
CLASS_ID, uri, oi) { }
416 #endif // GI_POLICY_UNIVERSE_HPP
static boost::optional< boost::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:54
void resolveGbpeEpgMapping(std::vector< boost::shared_ptr< modelgbp::gbpe::EpgMapping > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::EpgMapping.
Definition: policy/Universe.hpp:171
void resolvePlatformConfig(std::vector< boost::shared_ptr< modelgbp::platform::Config > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::platform::Config.
Definition: policy/Universe.hpp:231
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Universe.
Definition: policy/Universe.hpp:41
static boost::optional< boost::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< boost::shared_ptr< modelgbp::policy::Space > > resolvePolicySpace(const std::string &policySpaceName)
Retrieve the child object with the specified naming properties.
Definition: policy/Universe.hpp:248
boost::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:206
boost::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:146
static boost::optional< boost::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:111
boost::optional< boost::shared_ptr< modelgbp::gbpe::EpgMapping > > resolveGbpeEpgMapping(const std::string &gbpeEpgMappingName)
Retrieve the child object with the specified naming properties.
Definition: policy/Universe.hpp:128
static boost::optional< boost::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:92
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:352
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:371
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: policy/Universe.hpp:397
boost::optional< boost::shared_ptr< modelgbp::platform::Config > > resolvePlatformConfig(const std::string &platformConfigName)
Retrieve the child object with the specified naming properties.
Definition: policy/Universe.hpp:188
static boost::optional< boost::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
Universe(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Universe.
Definition: policy/Universe.hpp:407
Definition: policy/Universe.hpp:33
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: policy/Universe.hpp:383
static boost::optional< boost::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:72
boost::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:266
void resolvePolicySpace(std::vector< boost::shared_ptr< modelgbp::policy::Space > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::policy::Space.
Definition: policy/Universe.hpp:291