modelgbp Generated OpFlex Model  1.7.0
EpStatUniverse.hpp
1 
10 #pragma once
11 #ifndef GI_OBSERVER_EPSTATUNIVERSE_HPP
12 #define GI_OBSERVER_EPSTATUNIVERSE_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/EpCounter)
19  */
20 #include "modelgbp/gbpe/EpCounter.hpp"
21 /*
22  * contains: item:mclass(dfw/EpCounter)
23  */
24 #include "modelgbp/dfw/EpCounter.hpp"
25 
26 namespace modelgbp {
27 namespace observer {
28 
30  : public opflex::modb::mointernal::MO
31 {
32 public:
33 
37  static const opflex::modb::class_id_t CLASS_ID = 212;
38 
50  static boost::optional<OF_SHARED_PTR<modelgbp::observer::EpStatUniverse> > resolve(
51  opflex::ofcore::OFFramework& framework,
52  const opflex::modb::URI& uri)
53  {
54  return opflex::modb::mointernal::MO::resolve<modelgbp::observer::EpStatUniverse>(framework, CLASS_ID, uri);
55  }
56 
68  static boost::optional<OF_SHARED_PTR<modelgbp::observer::EpStatUniverse> > resolve(
69  const opflex::modb::URI& uri)
70  {
71  return opflex::modb::mointernal::MO::resolve<modelgbp::observer::EpStatUniverse>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
72  }
73 
88  static boost::optional<OF_SHARED_PTR<modelgbp::observer::EpStatUniverse> > resolve(
89  opflex::ofcore::OFFramework& framework)
90  {
91  return resolve(framework,opflex::modb::URIBuilder().addElement("ObserverEpStatUniverse").build());
92  }
93 
107  static boost::optional<OF_SHARED_PTR<modelgbp::observer::EpStatUniverse> > resolve(
108  )
109  {
110  return resolve(opflex::ofcore::OFFramework::defaultInstance());
111  }
112 
124  boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpCounter> > resolveGbpeEpCounter(
125  const std::string& gbpeEpCounterUuid)
126  {
127  return modelgbp::gbpe::EpCounter::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeEpCounter").addElement(gbpeEpCounterUuid).build());
128  }
129 
142  OF_SHARED_PTR<modelgbp::gbpe::EpCounter> addGbpeEpCounter(
143  const std::string& gbpeEpCounterUuid)
144  {
145  OF_SHARED_PTR<modelgbp::gbpe::EpCounter> result = addChild<modelgbp::gbpe::EpCounter>(
146  CLASS_ID, getURI(), 2154430507ul, 43,
147  opflex::modb::URIBuilder(getURI()).addElement("GbpeEpCounter").addElement(gbpeEpCounterUuid).build()
148  );
149  result->setUuid(gbpeEpCounterUuid);
150  return result;
151  }
152 
167  void resolveGbpeEpCounter(/* out */ std::vector<OF_SHARED_PTR<modelgbp::gbpe::EpCounter> >& out)
168  {
169  opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::EpCounter>(
170  getFramework(), CLASS_ID, getURI(), 2154430507ul, 43, out);
171  }
172 
184  boost::optional<OF_SHARED_PTR<modelgbp::dfw::EpCounter> > resolveDfwEpCounter(
185  const std::string& dfwEpCounterUuid)
186  {
187  return modelgbp::dfw::EpCounter::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("DfwEpCounter").addElement(dfwEpCounterUuid).build());
188  }
189 
202  OF_SHARED_PTR<modelgbp::dfw::EpCounter> addDfwEpCounter(
203  const std::string& dfwEpCounterUuid)
204  {
205  OF_SHARED_PTR<modelgbp::dfw::EpCounter> result = addChild<modelgbp::dfw::EpCounter>(
206  CLASS_ID, getURI(), 2154430519ul, 55,
207  opflex::modb::URIBuilder(getURI()).addElement("DfwEpCounter").addElement(dfwEpCounterUuid).build()
208  );
209  result->setUuid(dfwEpCounterUuid);
210  return result;
211  }
212 
227  void resolveDfwEpCounter(/* out */ std::vector<OF_SHARED_PTR<modelgbp::dfw::EpCounter> >& out)
228  {
229  opflex::modb::mointernal::MO::resolveChildren<modelgbp::dfw::EpCounter>(
230  getFramework(), CLASS_ID, getURI(), 2154430519ul, 55, out);
231  }
232 
241  void remove()
242  {
243  getTLMutator().remove(CLASS_ID, getURI());
244  }
245 
256  static void remove(opflex::ofcore::OFFramework& framework,
257  const opflex::modb::URI& uri)
258  {
259  MO::remove(framework, CLASS_ID, uri);
260  }
261 
272  static void remove(const opflex::modb::URI& uri)
273  {
274  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
275  }
276 
288  static void registerListener(
289  opflex::ofcore::OFFramework& framework,
290  opflex::modb::ObjectListener* listener)
291  {
292  opflex::modb::mointernal
293  ::MO::registerListener(framework, listener, CLASS_ID);
294  }
295 
307  static void registerListener(
308  opflex::modb::ObjectListener* listener)
309  {
310  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
311  }
312 
319  static void unregisterListener(
320  opflex::ofcore::OFFramework& framework,
321  opflex::modb::ObjectListener* listener)
322  {
323  opflex::modb::mointernal
324  ::MO::unregisterListener(framework, listener, CLASS_ID);
325  }
326 
333  static void unregisterListener(
334  opflex::modb::ObjectListener* listener)
335  {
336  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
337  }
338 
344  opflex::ofcore::OFFramework& framework,
345  const opflex::modb::URI& uri,
346  const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
347  : MO(framework, CLASS_ID, uri, oi) { }
348 }; // class EpStatUniverse
349 
350 } // namespace observer
351 } // namespace modelgbp
352 #endif // GI_OBSERVER_EPSTATUNIVERSE_HPP
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpCounter > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpCounter from the managed object store.
Definition: gbpe/EpCounter.hpp:770
static boost::optional< OF_SHARED_PTR< modelgbp::observer::EpStatUniverse > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of EpStatUniverse from the managed object store using the default framework inst...
Definition: EpStatUniverse.hpp:68
static boost::optional< OF_SHARED_PTR< modelgbp::observer::EpStatUniverse > > resolve()
Retrieve an instance of EpStatUniverse from the default managed object store by constructing its URI ...
Definition: EpStatUniverse.hpp:107
void resolveDfwEpCounter(std::vector< OF_SHARED_PTR< modelgbp::dfw::EpCounter > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::dfw::EpCounter.
Definition: EpStatUniverse.hpp:227
OF_SHARED_PTR< modelgbp::gbpe::EpCounter > addGbpeEpCounter(const std::string &gbpeEpCounterUuid)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: EpStatUniverse.hpp:142
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpCounter > > resolveGbpeEpCounter(const std::string &gbpeEpCounterUuid)
Retrieve the child object with the specified naming properties.
Definition: EpStatUniverse.hpp:124
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: EpStatUniverse.hpp:288
OF_SHARED_PTR< modelgbp::dfw::EpCounter > addDfwEpCounter(const std::string &dfwEpCounterUuid)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: EpStatUniverse.hpp:202
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: EpStatUniverse.hpp:307
void resolveGbpeEpCounter(std::vector< OF_SHARED_PTR< modelgbp::gbpe::EpCounter > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::EpCounter.
Definition: EpStatUniverse.hpp:167
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: EpStatUniverse.hpp:333
static boost::optional< OF_SHARED_PTR< modelgbp::observer::EpStatUniverse > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpStatUniverse from the managed object store.
Definition: EpStatUniverse.hpp:50
Definition: EpStatUniverse.hpp:29
EpStatUniverse(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of EpStatUniverse.
Definition: EpStatUniverse.hpp:343
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for EpStatUniverse.
Definition: EpStatUniverse.hpp:37
boost::optional< OF_SHARED_PTR< modelgbp::dfw::EpCounter > > resolveDfwEpCounter(const std::string &dfwEpCounterUuid)
Retrieve the child object with the specified naming properties.
Definition: EpStatUniverse.hpp:184
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: EpStatUniverse.hpp:319
static boost::optional< OF_SHARED_PTR< modelgbp::observer::EpStatUniverse > > resolve(opflex::ofcore::OFFramework &framework)
Retrieve an instance of EpStatUniverse from the managed object store by constructing its URI from the...
Definition: EpStatUniverse.hpp:88
static boost::optional< OF_SHARED_PTR< modelgbp::dfw::EpCounter > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpCounter from the managed object store.
Definition: dfw/EpCounter.hpp:210
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12