11 #ifndef GI_GBPE_VMEP_HPP
12 #define GI_GBPE_VMEP_HPP
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
20 #include "modelgbp/gbpe/Attestation.hpp"
26 :
public opflex::modb::mointernal::MO
33 static const opflex::modb::class_id_t
CLASS_ID = 26;
41 return getObjectInstance().isSet(851969ul, opflex::modb::PropertyInfo::STRING);
48 boost::optional<const std::string&>
getUuid()
51 return getObjectInstance().getString(851969ul);
60 const std::string&
getUuid(
const std::string& defaultValue)
62 return getUuid().get_value_or(defaultValue);
75 getTLMutator().modify(getClassId(), getURI())->setString(851969ul, newValue);
87 getTLMutator().modify(getClassId(), getURI())->unset(851969ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
102 static boost::optional<boost::shared_ptr<modelgbp::gbpe::VMEp> >
resolve(
103 opflex::ofcore::OFFramework& framework,
104 const opflex::modb::URI& uri)
106 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::VMEp>(framework,
CLASS_ID, uri);
120 static boost::optional<boost::shared_ptr<modelgbp::gbpe::VMEp> >
resolve(
121 const opflex::modb::URI& uri)
123 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::VMEp>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
142 static boost::optional<boost::shared_ptr<modelgbp::gbpe::VMEp> >
resolve(
143 opflex::ofcore::OFFramework& framework,
144 const std::string& gbpeVMEpUuid)
146 return resolve(framework,opflex::modb::URIBuilder().addElement(
"GbpeVMUniverse").addElement(
"GbpeVMEp").addElement(gbpeVMEpUuid).build());
164 static boost::optional<boost::shared_ptr<modelgbp::gbpe::VMEp> >
resolve(
165 const std::string& gbpeVMEpUuid)
167 return resolve(opflex::ofcore::OFFramework::defaultInstance(),gbpeVMEpUuid);
182 const std::string& gbpeAttestationName)
200 const std::string& gbpeAttestationName)
202 boost::shared_ptr<modelgbp::gbpe::Attestation> result = addChild<modelgbp::gbpe::Attestation>(
203 CLASS_ID, getURI(), 2148335652ul, 36,
204 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeAttestation").addElement(gbpeAttestationName).build()
206 result->setName(gbpeAttestationName);
226 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::Attestation>(
227 getFramework(),
CLASS_ID, getURI(), 2148335652ul, 36, out);
240 getTLMutator().remove(
CLASS_ID, getURI());
253 static void remove(opflex::ofcore::OFFramework& framework,
254 const opflex::modb::URI& uri)
256 MO::remove(framework,
CLASS_ID, uri);
269 static void remove(
const opflex::modb::URI& uri)
271 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
289 opflex::ofcore::OFFramework& framework,
290 const std::string& gbpeVMEpUuid)
292 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"GbpeVMUniverse").addElement(
"GbpeVMEp").addElement(gbpeVMEpUuid).build());
310 const std::string& gbpeVMEpUuid)
312 remove(opflex::ofcore::OFFramework::defaultInstance(),gbpeVMEpUuid);
327 opflex::ofcore::OFFramework& framework,
328 opflex::modb::ObjectListener* listener)
330 opflex::modb::mointernal
331 ::MO::registerListener(framework, listener,
CLASS_ID);
346 opflex::modb::ObjectListener* listener)
358 opflex::ofcore::OFFramework& framework,
359 opflex::modb::ObjectListener* listener)
361 opflex::modb::mointernal
362 ::MO::unregisterListener(framework, listener,
CLASS_ID);
372 opflex::modb::ObjectListener* listener)
382 opflex::ofcore::OFFramework& framework,
383 const opflex::modb::URI& uri,
384 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
385 : MO(framework,
CLASS_ID, uri, oi) { }
390 #endif // GI_GBPE_VMEP_HPP
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: VMEp.hpp:48
static boost::optional< boost::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 boost::optional< boost::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 unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: VMEp.hpp:371
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 void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: VMEp.hpp:357
static boost::optional< boost::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
static boost::optional< boost::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
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
VMEp(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of VMEp.
Definition: VMEp.hpp:381
void resolveGbpeAttestation(std::vector< boost::shared_ptr< modelgbp::gbpe::Attestation > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::Attestation.
Definition: VMEp.hpp:224
boost::optional< boost::shared_ptr< modelgbp::gbpe::Attestation > > resolveGbpeAttestation(const std::string &gbpeAttestationName)
Retrieve the child object with the specified naming properties.
Definition: VMEp.hpp:181
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for VMEp.
Definition: VMEp.hpp:33
static boost::optional< boost::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
modelgbp::gbpe::VMEp & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: VMEp.hpp:73
boost::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
bool isUuidSet()
Check whether uuid has been set.
Definition: VMEp.hpp:39
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
modelgbp::gbpe::VMEp & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: VMEp.hpp:85