modelgbp Generated OpFlex Model  1.9.0
domain/Config.hpp
1 
10 #pragma once
11 #ifndef GI_DOMAIN_CONFIG_HPP
12 #define GI_DOMAIN_CONFIG_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(domain/ConfigToConfigRSrc)
19  */
20 #include "modelgbp/domain/ConfigToConfigRSrc.hpp"
21 /*
22  * contains: item:mclass(domain/ConfigToEndpointInventoryRSrc)
23  */
24 #include "modelgbp/domain/ConfigToEndpointInventoryRSrc.hpp"
25 /*
26  * contains: item:mclass(domain/ConfigToRemoteEndpointInventoryRSrc)
27  */
28 #include "modelgbp/domain/ConfigToRemoteEndpointInventoryRSrc.hpp"
29 
30 namespace modelgbp {
31 namespace domain {
32 
33 class Config
34  : public opflex::modb::mointernal::MO
35 {
36 public:
37 
41  static const opflex::modb::class_id_t CLASS_ID = 56;
42 
54  static boost::optional<OF_SHARED_PTR<modelgbp::domain::Config> > resolve(
55  opflex::ofcore::OFFramework& framework,
56  const opflex::modb::URI& uri)
57  {
58  return opflex::modb::mointernal::MO::resolve<modelgbp::domain::Config>(framework, CLASS_ID, uri);
59  }
60 
72  static boost::optional<OF_SHARED_PTR<modelgbp::domain::Config> > resolve(
73  const opflex::modb::URI& uri)
74  {
75  return opflex::modb::mointernal::MO::resolve<modelgbp::domain::Config>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
76  }
77 
92  static boost::optional<OF_SHARED_PTR<modelgbp::domain::Config> > resolve(
93  opflex::ofcore::OFFramework& framework)
94  {
95  return resolve(framework,opflex::modb::URIBuilder().addElement("DomainConfig").build());
96  }
97 
111  static boost::optional<OF_SHARED_PTR<modelgbp::domain::Config> > resolve(
112  )
113  {
114  return resolve(opflex::ofcore::OFFramework::defaultInstance());
115  }
116 
126  boost::optional<OF_SHARED_PTR<modelgbp::domain::ConfigToConfigRSrc> > resolveDomainConfigToConfigRSrc(
127  )
128  {
129  return modelgbp::domain::ConfigToConfigRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("DomainConfigToConfigRSrc").build());
130  }
131 
142  OF_SHARED_PTR<modelgbp::domain::ConfigToConfigRSrc> addDomainConfigToConfigRSrc(
143  )
144  {
145  OF_SHARED_PTR<modelgbp::domain::ConfigToConfigRSrc> result = addChild<modelgbp::domain::ConfigToConfigRSrc>(
146  CLASS_ID, getURI(), 2149318713ul, 57,
147  opflex::modb::URIBuilder(getURI()).addElement("DomainConfigToConfigRSrc").build()
148  );
149  return result;
150  }
151 
165  boost::optional<OF_SHARED_PTR<modelgbp::domain::ConfigToEndpointInventoryRSrc> > resolveDomainConfigToEndpointInventoryRSrc(
166  const std::string& domainConfigToEndpointInventoryRSrcTargetName)
167  {
168  opflex::modb::class_id_t domainConfigToEndpointInventoryRSrcTargetClass = 117;
169  return modelgbp::domain::ConfigToEndpointInventoryRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("DomainConfigToEndpointInventoryRSrc").addElement(domainConfigToEndpointInventoryRSrcTargetClass).addElement(domainConfigToEndpointInventoryRSrcTargetName).build());
170  }
171 
186  OF_SHARED_PTR<modelgbp::domain::ConfigToEndpointInventoryRSrc> addDomainConfigToEndpointInventoryRSrc(
187  const std::string& domainConfigToEndpointInventoryRSrcTargetName)
188  {
189  opflex::modb::class_id_t domainConfigToEndpointInventoryRSrcTargetClass = 117;
190  OF_SHARED_PTR<modelgbp::domain::ConfigToEndpointInventoryRSrc> result = addChild<modelgbp::domain::ConfigToEndpointInventoryRSrc>(
191  CLASS_ID, getURI(), 2149318716ul, 60,
192  opflex::modb::URIBuilder(getURI()).addElement("DomainConfigToEndpointInventoryRSrc").addElement(domainConfigToEndpointInventoryRSrcTargetClass).addElement(domainConfigToEndpointInventoryRSrcTargetName).build()
193  );
194  result->setTargetLocalEndpointInventory(opflex::modb::URI(domainConfigToEndpointInventoryRSrcTargetName));
195  return result;
196  }
197 
212  void resolveDomainConfigToEndpointInventoryRSrc(/* out */ std::vector<OF_SHARED_PTR<modelgbp::domain::ConfigToEndpointInventoryRSrc> >& out)
213  {
214  opflex::modb::mointernal::MO::resolveChildren<modelgbp::domain::ConfigToEndpointInventoryRSrc>(
215  getFramework(), CLASS_ID, getURI(), 2149318716ul, 60, out);
216  }
217 
227  boost::optional<OF_SHARED_PTR<modelgbp::domain::ConfigToRemoteEndpointInventoryRSrc> > resolveDomainConfigToRemoteEndpointInventoryRSrc(
228  )
229  {
230  return modelgbp::domain::ConfigToRemoteEndpointInventoryRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("DomainConfigToRemoteEndpointInventoryRSrc").build());
231  }
232 
243  OF_SHARED_PTR<modelgbp::domain::ConfigToRemoteEndpointInventoryRSrc> addDomainConfigToRemoteEndpointInventoryRSrc(
244  )
245  {
246  OF_SHARED_PTR<modelgbp::domain::ConfigToRemoteEndpointInventoryRSrc> result = addChild<modelgbp::domain::ConfigToRemoteEndpointInventoryRSrc>(
247  CLASS_ID, getURI(), 2149318719ul, 63,
248  opflex::modb::URIBuilder(getURI()).addElement("DomainConfigToRemoteEndpointInventoryRSrc").build()
249  );
250  return result;
251  }
252 
261  void remove()
262  {
263  getTLMutator().remove(CLASS_ID, getURI());
264  }
265 
276  static void remove(opflex::ofcore::OFFramework& framework,
277  const opflex::modb::URI& uri)
278  {
279  MO::remove(framework, CLASS_ID, uri);
280  }
281 
292  static void remove(const opflex::modb::URI& uri)
293  {
294  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
295  }
296 
308  static void registerListener(
309  opflex::ofcore::OFFramework& framework,
310  opflex::modb::ObjectListener* listener)
311  {
312  opflex::modb::mointernal
313  ::MO::registerListener(framework, listener, CLASS_ID);
314  }
315 
327  static void registerListener(
328  opflex::modb::ObjectListener* listener)
329  {
330  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
331  }
332 
339  static void unregisterListener(
340  opflex::ofcore::OFFramework& framework,
341  opflex::modb::ObjectListener* listener)
342  {
343  opflex::modb::mointernal
344  ::MO::unregisterListener(framework, listener, CLASS_ID);
345  }
346 
353  static void unregisterListener(
354  opflex::modb::ObjectListener* listener)
355  {
356  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
357  }
358 
364  opflex::ofcore::OFFramework& framework,
365  const opflex::modb::URI& uri,
366  const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
367  : MO(framework, CLASS_ID, uri, oi) { }
368 }; // class Config
369 
370 } // namespace domain
371 } // namespace modelgbp
372 #endif // GI_DOMAIN_CONFIG_HPP
static boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigToRemoteEndpointInventoryRSrc > > resolve()
Retrieve an instance of ConfigToRemoteEndpointInventoryRSrc from the default managed object store by ...
Definition: ConfigToRemoteEndpointInventoryRSrc.hpp:309
static boost::optional< OF_SHARED_PTR< modelgbp::domain::Config > > resolve()
Retrieve an instance of Config from the default managed object store by constructing its URI from the...
Definition: domain/Config.hpp:111
static boost::optional< OF_SHARED_PTR< modelgbp::domain::Config > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Config from the managed object store.
Definition: domain/Config.hpp:54
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: domain/Config.hpp:327
static boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigToConfigRSrc > > resolve()
Retrieve an instance of ConfigToConfigRSrc from the default managed object store by constructing its ...
Definition: ConfigToConfigRSrc.hpp:311
static boost::optional< OF_SHARED_PTR< modelgbp::domain::Config > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of Config from the managed object store using the default framework instance...
Definition: domain/Config.hpp:72
boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigToRemoteEndpointInventoryRSrc > > resolveDomainConfigToRemoteEndpointInventoryRSrc()
Retrieve the child object with the specified naming properties.
Definition: domain/Config.hpp:227
Definition: domain/Config.hpp:33
boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigToConfigRSrc > > resolveDomainConfigToConfigRSrc()
Retrieve the child object with the specified naming properties.
Definition: domain/Config.hpp:126
void resolveDomainConfigToEndpointInventoryRSrc(std::vector< OF_SHARED_PTR< modelgbp::domain::ConfigToEndpointInventoryRSrc > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::domain::ConfigToEndpointInventor...
Definition: domain/Config.hpp:212
static boost::optional< OF_SHARED_PTR< modelgbp::domain::Config > > resolve(opflex::ofcore::OFFramework &framework)
Retrieve an instance of Config from the managed object store by constructing its URI from the path el...
Definition: domain/Config.hpp:92
boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigToEndpointInventoryRSrc > > resolveDomainConfigToEndpointInventoryRSrc(const std::string &domainConfigToEndpointInventoryRSrcTargetName)
Retrieve the child object with the specified naming properties.
Definition: domain/Config.hpp:165
OF_SHARED_PTR< modelgbp::domain::ConfigToConfigRSrc > addDomainConfigToConfigRSrc()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: domain/Config.hpp:142
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: domain/Config.hpp:339
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: domain/Config.hpp:353
Config(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Config.
Definition: domain/Config.hpp:363
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: domain/Config.hpp:308
OF_SHARED_PTR< modelgbp::domain::ConfigToRemoteEndpointInventoryRSrc > addDomainConfigToRemoteEndpointInventoryRSrc()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: domain/Config.hpp:243
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Config.
Definition: domain/Config.hpp:41
static boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigToEndpointInventoryRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of ConfigToEndpointInventoryRSrc from the managed object store.
Definition: ConfigToEndpointInventoryRSrc.hpp:254
OF_SHARED_PTR< modelgbp::domain::ConfigToEndpointInventoryRSrc > addDomainConfigToEndpointInventoryRSrc(const std::string &domainConfigToEndpointInventoryRSrcTargetName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: domain/Config.hpp:186