modelgbp Generated OpFlex Model  1.3.0
policy/Universe.hpp
1 
10 #pragma once
11 #ifndef GI_POLICY_UNIVERSE_HPP
12 #define GI_POLICY_UNIVERSE_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/EpgMapping)
19  */
20 #include "modelgbp/gbpe/EpgMapping.hpp"
21 /*
22  * contains: item:mclass(platform/Config)
23  */
24 #include "modelgbp/platform/Config.hpp"
25 /*
26  * contains: item:mclass(policy/Space)
27  */
28 #include "modelgbp/policy/Space.hpp"
29 
30 namespace modelgbp {
31 namespace policy {
32 
33 class Universe
34  : public opflex::modb::mointernal::MO
35 {
36 public:
37 
41  static const opflex::modb::class_id_t CLASS_ID = 178;
42 
54  static boost::optional<boost::shared_ptr<modelgbp::policy::Universe> > resolve(
55  opflex::ofcore::OFFramework& framework,
56  const opflex::modb::URI& uri)
57  {
58  return opflex::modb::mointernal::MO::resolve<modelgbp::policy::Universe>(framework, CLASS_ID, uri);
59  }
60 
72  static boost::optional<boost::shared_ptr<modelgbp::policy::Universe> > resolve(
73  const opflex::modb::URI& uri)
74  {
75  return opflex::modb::mointernal::MO::resolve<modelgbp::policy::Universe>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
76  }
77 
92  static boost::optional<boost::shared_ptr<modelgbp::policy::Universe> > resolve(
93  opflex::ofcore::OFFramework& framework)
94  {
95  return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").build());
96  }
97 
111  static boost::optional<boost::shared_ptr<modelgbp::policy::Universe> > resolve(
112  )
113  {
114  return resolve(opflex::ofcore::OFFramework::defaultInstance());
115  }
116 
128  boost::optional<boost::shared_ptr<modelgbp::gbpe::EpgMapping> > resolveGbpeEpgMapping(
129  const std::string& gbpeEpgMappingName)
130  {
131  return modelgbp::gbpe::EpgMapping::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeEpgMapping").addElement(gbpeEpgMappingName).build());
132  }
133 
146  boost::shared_ptr<modelgbp::gbpe::EpgMapping> addGbpeEpgMapping(
147  const std::string& gbpeEpgMappingName)
148  {
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()
152  );
153  result->setName(gbpeEpgMappingName);
154  return result;
155  }
156 
171  void resolveGbpeEpgMapping(/* out */ std::vector<boost::shared_ptr<modelgbp::gbpe::EpgMapping> >& out)
172  {
173  opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::EpgMapping>(
174  getFramework(), CLASS_ID, getURI(), 2153316361ul, 9, out);
175  }
176 
188  boost::optional<boost::shared_ptr<modelgbp::platform::Config> > resolvePlatformConfig(
189  const std::string& platformConfigName)
190  {
191  return modelgbp::platform::Config::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("PlatformConfig").addElement(platformConfigName).build());
192  }
193 
206  boost::shared_ptr<modelgbp::platform::Config> addPlatformConfig(
207  const std::string& platformConfigName)
208  {
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()
212  );
213  result->setName(platformConfigName);
214  return result;
215  }
216 
231  void resolvePlatformConfig(/* out */ std::vector<boost::shared_ptr<modelgbp::platform::Config> >& out)
232  {
233  opflex::modb::mointernal::MO::resolveChildren<modelgbp::platform::Config>(
234  getFramework(), CLASS_ID, getURI(), 2153316389ul, 37, out);
235  }
236 
248  boost::optional<boost::shared_ptr<modelgbp::policy::Space> > resolvePolicySpace(
249  const std::string& policySpaceName)
250  {
251  return modelgbp::policy::Space::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("PolicySpace").addElement(policySpaceName).build());
252  }
253 
266  boost::shared_ptr<modelgbp::policy::Space> addPolicySpace(
267  const std::string& policySpaceName)
268  {
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()
272  );
273  result->setName(policySpaceName);
274  return result;
275  }
276 
291  void resolvePolicySpace(/* out */ std::vector<boost::shared_ptr<modelgbp::policy::Space> >& out)
292  {
293  opflex::modb::mointernal::MO::resolveChildren<modelgbp::policy::Space>(
294  getFramework(), CLASS_ID, getURI(), 2153316531ul, 179, out);
295  }
296 
305  void remove()
306  {
307  getTLMutator().remove(CLASS_ID, getURI());
308  }
309 
320  static void remove(opflex::ofcore::OFFramework& framework,
321  const opflex::modb::URI& uri)
322  {
323  MO::remove(framework, CLASS_ID, uri);
324  }
325 
336  static void remove(const opflex::modb::URI& uri)
337  {
338  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
339  }
340 
352  static void registerListener(
353  opflex::ofcore::OFFramework& framework,
354  opflex::modb::ObjectListener* listener)
355  {
356  opflex::modb::mointernal
357  ::MO::registerListener(framework, listener, CLASS_ID);
358  }
359 
371  static void registerListener(
372  opflex::modb::ObjectListener* listener)
373  {
374  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
375  }
376 
383  static void unregisterListener(
384  opflex::ofcore::OFFramework& framework,
385  opflex::modb::ObjectListener* listener)
386  {
387  opflex::modb::mointernal
388  ::MO::unregisterListener(framework, listener, CLASS_ID);
389  }
390 
397  static void unregisterListener(
398  opflex::modb::ObjectListener* listener)
399  {
400  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
401  }
402 
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) { }
412 }; // class Universe
413 
414 } // namespace policy
415 } // namespace modelgbp
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 boost::optional< boost::shared_ptr< modelgbp::platform::Config > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Config from the managed object store.
Definition: platform/Config.hpp:310
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