modelgbp Generated OpFlex Model 1.7.0
VMEp.hpp
1
10#pragma once
11#ifndef GI_GBPE_VMEP_HPP
12#define GI_GBPE_VMEP_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/Attestation)
19 */
20#include "modelgbp/gbpe/Attestation.hpp"
21
22namespace modelgbp {
23namespace gbpe {
24
25class VMEp
26 : public opflex::modb::mointernal::MO
27{
28public:
29
33 static const opflex::modb::class_id_t CLASS_ID = 35;
34
39 bool isUuidSet()
40 {
41 return getObjectInstance().isSet(1146881ul, opflex::modb::PropertyInfo::STRING);
42 }
43
48 boost::optional<const std::string&> getUuid()
49 {
50 if (isUuidSet())
51 return getObjectInstance().getString(1146881ul);
52 return boost::none;
53 }
54
60 const std::string& getUuid(const std::string& defaultValue)
61 {
62 return getUuid().get_value_or(defaultValue);
63 }
64
73 modelgbp::gbpe::VMEp& setUuid(const std::string& newValue)
74 {
75 getTLMutator().modify(getClassId(), getURI())->setString(1146881ul, newValue);
76 return *this;
77 }
78
86 {
87 getTLMutator().modify(getClassId(), getURI())->unset(1146881ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
88 return *this;
89 }
90
102 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::VMEp> > resolve(
103 opflex::ofcore::OFFramework& framework,
104 const opflex::modb::URI& uri)
105 {
106 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::VMEp>(framework, CLASS_ID, uri);
107 }
108
120 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::VMEp> > resolve(
121 const opflex::modb::URI& uri)
122 {
123 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::VMEp>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
124 }
125
142 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::VMEp> > resolve(
143 opflex::ofcore::OFFramework& framework,
144 const std::string& gbpeVMEpUuid)
145 {
146 return resolve(framework,opflex::modb::URIBuilder().addElement("GbpeVMUniverse").addElement("GbpeVMEp").addElement(gbpeVMEpUuid).build());
147 }
148
164 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::VMEp> > resolve(
165 const std::string& gbpeVMEpUuid)
166 {
167 return resolve(opflex::ofcore::OFFramework::defaultInstance(),gbpeVMEpUuid);
168 }
169
181 boost::optional<OF_SHARED_PTR<modelgbp::gbpe::Attestation> > resolveGbpeAttestation(
182 const std::string& gbpeAttestationName)
183 {
184 return modelgbp::gbpe::Attestation::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeAttestation").addElement(gbpeAttestationName).build());
185 }
186
199 OF_SHARED_PTR<modelgbp::gbpe::Attestation> addGbpeAttestation(
200 const std::string& gbpeAttestationName)
201 {
202 OF_SHARED_PTR<modelgbp::gbpe::Attestation> result = addChild<modelgbp::gbpe::Attestation>(
203 CLASS_ID, getURI(), 2148630575ul, 47,
204 opflex::modb::URIBuilder(getURI()).addElement("GbpeAttestation").addElement(gbpeAttestationName).build()
205 );
206 result->setName(gbpeAttestationName);
207 return result;
208 }
209
224 void resolveGbpeAttestation(/* out */ std::vector<OF_SHARED_PTR<modelgbp::gbpe::Attestation> >& out)
225 {
226 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::Attestation>(
227 getFramework(), CLASS_ID, getURI(), 2148630575ul, 47, out);
228 }
229
238 void remove()
239 {
240 getTLMutator().remove(CLASS_ID, getURI());
241 }
242
253 static void remove(opflex::ofcore::OFFramework& framework,
254 const opflex::modb::URI& uri)
255 {
256 MO::remove(framework, CLASS_ID, uri);
257 }
258
269 static void remove(const opflex::modb::URI& uri)
270 {
271 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
272 }
273
288 static void remove(
289 opflex::ofcore::OFFramework& framework,
290 const std::string& gbpeVMEpUuid)
291 {
292 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("GbpeVMUniverse").addElement("GbpeVMEp").addElement(gbpeVMEpUuid).build());
293 }
294
309 static void remove(
310 const std::string& gbpeVMEpUuid)
311 {
312 remove(opflex::ofcore::OFFramework::defaultInstance(),gbpeVMEpUuid);
313 }
314
326 static void registerListener(
327 opflex::ofcore::OFFramework& framework,
328 opflex::modb::ObjectListener* listener)
329 {
330 opflex::modb::mointernal
331 ::MO::registerListener(framework, listener, CLASS_ID);
332 }
333
345 static void registerListener(
346 opflex::modb::ObjectListener* listener)
347 {
348 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
349 }
350
358 opflex::ofcore::OFFramework& framework,
359 opflex::modb::ObjectListener* listener)
360 {
361 opflex::modb::mointernal
362 ::MO::unregisterListener(framework, listener, CLASS_ID);
363 }
364
372 opflex::modb::ObjectListener* listener)
373 {
374 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
375 }
376
382 opflex::ofcore::OFFramework& framework,
383 const opflex::modb::URI& uri,
384 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
385 : MO(framework, CLASS_ID, uri, oi) { }
386}; // class VMEp
387
388} // namespace gbpe
389} // namespace modelgbp
390#endif // GI_GBPE_VMEP_HPP
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::Attestation > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Attestation from the managed object store.
Definition Attestation.hpp:210
Definition VMEp.hpp:27
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::VMEp > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of VMEp from the managed object store.
Definition VMEp.hpp:102
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 VMEp.hpp:345
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 VMEp.hpp:326
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::VMEp > > resolve(const std::string &gbpeVMEpUuid)
Retrieve an instance of VMEp from the default managed object store by constructing its URI from the p...
Definition VMEp.hpp:164
void remove()
Remove this instance using the currently-active mutator.
Definition VMEp.hpp:238
modelgbp::gbpe::VMEp & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition VMEp.hpp:73
void resolveGbpeAttestation(std::vector< OF_SHARED_PTR< modelgbp::gbpe::Attestation > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::Attestation.
Definition VMEp.hpp:224
static void remove(const opflex::modb::URI &uri)
Remove the VMEp object with the specified URI using the currently-active mutator and the default fram...
Definition VMEp.hpp:269
bool isUuidSet()
Check whether uuid has been set.
Definition VMEp.hpp:39
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for VMEp.
Definition VMEp.hpp:33
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::Attestation > > resolveGbpeAttestation(const std::string &gbpeAttestationName)
Retrieve the child object with the specified naming properties.
Definition VMEp.hpp:181
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition VMEp.hpp:48
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::VMEp > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of VMEp from the managed object store using the default framework instance.
Definition VMEp.hpp:120
static void remove(const std::string &gbpeVMEpUuid)
Remove the VMEp object with the specified path elements from the managed object store using the defau...
Definition VMEp.hpp:309
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the VMEp object with the specified URI using the currently-active mutator.
Definition VMEp.hpp:253
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition VMEp.hpp:357
static void remove(opflex::ofcore::OFFramework &framework, const std::string &gbpeVMEpUuid)
Remove the VMEp object with the specified path elements from the managed object store.
Definition VMEp.hpp:288
const std::string & getUuid(const std::string &defaultValue)
Get the value of uuid if set, otherwise the value of default passed in.
Definition VMEp.hpp:60
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition VMEp.hpp:371
VMEp(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of VMEp.
Definition VMEp.hpp:381
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::VMEp > > resolve(opflex::ofcore::OFFramework &framework, const std::string &gbpeVMEpUuid)
Retrieve an instance of VMEp from the managed object store by constructing its URI from the path elem...
Definition VMEp.hpp:142
OF_SHARED_PTR< modelgbp::gbpe::Attestation > addGbpeAttestation(const std::string &gbpeAttestationName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition VMEp.hpp:199
modelgbp::gbpe::VMEp & unsetUuid()
Unset uuid in the currently-active mutator.
Definition VMEp.hpp:85
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12