modelgbp Generated OpFlex Model 1.7.0
L2Universe.hpp
1
10#pragma once
11#ifndef GI_EPR_L2UNIVERSE_HPP
12#define GI_EPR_L2UNIVERSE_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(epr/L2Ep)
19 */
20#include "modelgbp/epr/L2Ep.hpp"
21
22namespace modelgbp {
23namespace epr {
24
26 : public opflex::modb::mointernal::MO
27{
28public:
29
33 static const opflex::modb::class_id_t CLASS_ID = 138;
34
46 static boost::optional<OF_SHARED_PTR<modelgbp::epr::L2Universe> > resolve(
47 opflex::ofcore::OFFramework& framework,
48 const opflex::modb::URI& uri)
49 {
50 return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L2Universe>(framework, CLASS_ID, uri);
51 }
52
64 static boost::optional<OF_SHARED_PTR<modelgbp::epr::L2Universe> > resolve(
65 const opflex::modb::URI& uri)
66 {
67 return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L2Universe>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
68 }
69
84 static boost::optional<OF_SHARED_PTR<modelgbp::epr::L2Universe> > resolve(
85 opflex::ofcore::OFFramework& framework)
86 {
87 return resolve(framework,opflex::modb::URIBuilder().addElement("EprL2Universe").build());
88 }
89
103 static boost::optional<OF_SHARED_PTR<modelgbp::epr::L2Universe> > resolve(
104 )
105 {
106 return resolve(opflex::ofcore::OFFramework::defaultInstance());
107 }
108
122 boost::optional<OF_SHARED_PTR<modelgbp::epr::L2Ep> > resolveEprL2Ep(
123 const std::string& eprL2EpContext,
124 const opflex::modb::MAC& eprL2EpMac)
125 {
126 return modelgbp::epr::L2Ep::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("EprL2Ep").addElement(eprL2EpContext).addElement(eprL2EpMac).build());
127 }
128
143 OF_SHARED_PTR<modelgbp::epr::L2Ep> addEprL2Ep(
144 const std::string& eprL2EpContext,
145 const opflex::modb::MAC& eprL2EpMac)
146 {
147 OF_SHARED_PTR<modelgbp::epr::L2Ep> result = addChild<modelgbp::epr::L2Ep>(
148 CLASS_ID, getURI(), 2152005731ul, 99,
149 opflex::modb::URIBuilder(getURI()).addElement("EprL2Ep").addElement(eprL2EpContext).addElement(eprL2EpMac).build()
150 );
151 result->setContext(eprL2EpContext);
152 result->setMac(eprL2EpMac);
153 return result;
154 }
155
170 void resolveEprL2Ep(/* out */ std::vector<OF_SHARED_PTR<modelgbp::epr::L2Ep> >& out)
171 {
172 opflex::modb::mointernal::MO::resolveChildren<modelgbp::epr::L2Ep>(
173 getFramework(), CLASS_ID, getURI(), 2152005731ul, 99, out);
174 }
175
184 void remove()
185 {
186 getTLMutator().remove(CLASS_ID, getURI());
187 }
188
199 static void remove(opflex::ofcore::OFFramework& framework,
200 const opflex::modb::URI& uri)
201 {
202 MO::remove(framework, CLASS_ID, uri);
203 }
204
215 static void remove(const opflex::modb::URI& uri)
216 {
217 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
218 }
219
231 static void registerListener(
232 opflex::ofcore::OFFramework& framework,
233 opflex::modb::ObjectListener* listener)
234 {
235 opflex::modb::mointernal
236 ::MO::registerListener(framework, listener, CLASS_ID);
237 }
238
250 static void registerListener(
251 opflex::modb::ObjectListener* listener)
252 {
253 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
254 }
255
263 opflex::ofcore::OFFramework& framework,
264 opflex::modb::ObjectListener* listener)
265 {
266 opflex::modb::mointernal
267 ::MO::unregisterListener(framework, listener, CLASS_ID);
268 }
269
277 opflex::modb::ObjectListener* listener)
278 {
279 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
280 }
281
287 opflex::ofcore::OFFramework& framework,
288 const opflex::modb::URI& uri,
289 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
290 : MO(framework, CLASS_ID, uri, oi) { }
291}; // class L2Universe
292
293} // namespace epr
294} // namespace modelgbp
295#endif // GI_EPR_L2UNIVERSE_HPP
static boost::optional< OF_SHARED_PTR< modelgbp::epr::L2Ep > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of L2Ep from the managed object store.
Definition L2Ep.hpp:398
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for L2Universe.
Definition L2Universe.hpp:33
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition L2Universe.hpp:276
static void remove(const opflex::modb::URI &uri)
Remove the L2Universe object with the specified URI using the currently-active mutator and the defaul...
Definition L2Universe.hpp:215
L2Universe(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of L2Universe.
Definition L2Universe.hpp:286
static boost::optional< OF_SHARED_PTR< modelgbp::epr::L2Universe > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of L2Universe from the managed object store using the default framework instance...
Definition L2Universe.hpp:64
void remove()
Remove this instance using the currently-active mutator.
Definition L2Universe.hpp:184
static boost::optional< OF_SHARED_PTR< modelgbp::epr::L2Universe > > resolve(opflex::ofcore::OFFramework &framework)
Retrieve an instance of L2Universe from the managed object store by constructing its URI from the pat...
Definition L2Universe.hpp:84
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the L2Universe object with the specified URI using the currently-active mutator.
Definition L2Universe.hpp:199
static boost::optional< OF_SHARED_PTR< modelgbp::epr::L2Universe > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of L2Universe from the managed object store.
Definition L2Universe.hpp:46
void resolveEprL2Ep(std::vector< OF_SHARED_PTR< modelgbp::epr::L2Ep > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::epr::L2Ep.
Definition L2Universe.hpp:170
static boost::optional< OF_SHARED_PTR< modelgbp::epr::L2Universe > > resolve()
Retrieve an instance of L2Universe from the default managed object store by constructing its URI from...
Definition L2Universe.hpp:103
OF_SHARED_PTR< modelgbp::epr::L2Ep > addEprL2Ep(const std::string &eprL2EpContext, const opflex::modb::MAC &eprL2EpMac)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition L2Universe.hpp:143
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 L2Universe.hpp:250
boost::optional< OF_SHARED_PTR< modelgbp::epr::L2Ep > > resolveEprL2Ep(const std::string &eprL2EpContext, const opflex::modb::MAC &eprL2EpMac)
Retrieve the child object with the specified naming properties.
Definition L2Universe.hpp:122
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition L2Universe.hpp:262
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 L2Universe.hpp:231
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12