11 #ifndef GI_DCI_UNIVERSE_HPP 12 #define GI_DCI_UNIVERSE_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 20 #include "modelgbp/dci/EpFromUnivRTgt.hpp" 24 #include "modelgbp/dci/Domain.hpp" 30 :
public opflex::modb::mointernal::MO
37 static const opflex::modb::class_id_t
CLASS_ID = 81;
45 return getObjectInstance().isSet(2654209ul, opflex::modb::PropertyInfo::STRING);
52 boost::optional<const std::string&>
getName()
55 return getObjectInstance().getString(2654209ul);
64 const std::string&
getName(
const std::string& defaultValue)
66 return getName().get_value_or(defaultValue);
79 getTLMutator().modify(getClassId(), getURI())->setString(2654209ul, newValue);
91 getTLMutator().modify(getClassId(), getURI())->unset(2654209ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
106 static boost::optional<OF_SHARED_PTR<modelgbp::dci::Universe> >
resolve(
107 opflex::ofcore::OFFramework& framework,
108 const opflex::modb::URI& uri)
110 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::Universe>(framework,
CLASS_ID, uri);
124 static boost::optional<OF_SHARED_PTR<modelgbp::dci::Universe> >
resolve(
125 const opflex::modb::URI& uri)
127 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::Universe>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
144 static boost::optional<OF_SHARED_PTR<modelgbp::dci::Universe> >
resolve(
145 opflex::ofcore::OFFramework& framework)
147 return resolve(framework,opflex::modb::URIBuilder().addElement(
"DciUniverse").build());
163 static boost::optional<OF_SHARED_PTR<modelgbp::dci::Universe> >
resolve(
166 return resolve(opflex::ofcore::OFFramework::defaultInstance());
197 OF_SHARED_PTR<modelgbp::dci::EpFromUnivRTgt> result = addChild<modelgbp::dci::EpFromUnivRTgt>(
198 CLASS_ID, getURI(), 2150137941ul, 85,
199 opflex::modb::URIBuilder(getURI()).addElement(
"DciEpFromUnivRTgt").build()
216 const std::string& dciDomainName)
218 return modelgbp::dci::Domain::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"DciDomain").addElement(dciDomainName).build());
234 const std::string& dciDomainName)
236 OF_SHARED_PTR<modelgbp::dci::Domain> result = addChild<modelgbp::dci::Domain>(
237 CLASS_ID, getURI(), 2150137943ul, 87,
238 opflex::modb::URIBuilder(getURI()).addElement(
"DciDomain").addElement(dciDomainName).build()
240 result->setName(dciDomainName);
260 opflex::modb::mointernal::MO::resolveChildren<modelgbp::dci::Domain>(
261 getFramework(),
CLASS_ID, getURI(), 2150137943ul, 87, out);
274 getTLMutator().remove(
CLASS_ID, getURI());
287 static void remove(opflex::ofcore::OFFramework& framework,
288 const opflex::modb::URI& uri)
290 MO::remove(framework,
CLASS_ID, uri);
303 static void remove(
const opflex::modb::URI& uri)
305 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
320 opflex::ofcore::OFFramework& framework,
321 opflex::modb::ObjectListener* listener)
323 opflex::modb::mointernal
324 ::MO::registerListener(framework, listener,
CLASS_ID);
339 opflex::modb::ObjectListener* listener)
351 opflex::ofcore::OFFramework& framework,
352 opflex::modb::ObjectListener* listener)
354 opflex::modb::mointernal
355 ::MO::unregisterListener(framework, listener,
CLASS_ID);
365 opflex::modb::ObjectListener* listener)
375 opflex::ofcore::OFFramework& framework,
376 const opflex::modb::URI& uri,
377 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
378 : MO(framework,
CLASS_ID, uri, oi) { }
383 #endif // GI_DCI_UNIVERSE_HPP static boost::optional< OF_SHARED_PTR< modelgbp::dci::Universe > > resolve()
Retrieve an instance of Universe from the default managed object store by constructing its URI from t...
Definition: dci/Universe.hpp:163
Universe(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Universe.
Definition: dci/Universe.hpp:374
modelgbp::dci::Universe & unsetName()
Unset name in the currently-active mutator.
Definition: dci/Universe.hpp:89
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: dci/Universe.hpp:64
bool isNameSet()
Check whether name has been set.
Definition: dci/Universe.hpp:43
static boost::optional< OF_SHARED_PTR< modelgbp::dci::Domain > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Domain from the managed object store.
Definition: Domain.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: dci/Universe.hpp:338
OF_SHARED_PTR< modelgbp::dci::EpFromUnivRTgt > addDciEpFromUnivRTgt()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: dci/Universe.hpp:194
static boost::optional< OF_SHARED_PTR< modelgbp::dci::Universe > > resolve(opflex::ofcore::OFFramework &framework)
Retrieve an instance of Universe from the managed object store by constructing its URI from the path ...
Definition: dci/Universe.hpp:144
OF_SHARED_PTR< modelgbp::dci::Domain > addDciDomain(const std::string &dciDomainName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: dci/Universe.hpp:233
static boost::optional< OF_SHARED_PTR< modelgbp::dci::EpFromUnivRTgt > > resolve()
Retrieve an instance of EpFromUnivRTgt from the default managed object store by constructing its URI ...
Definition: EpFromUnivRTgt.hpp:267
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Universe.
Definition: dci/Universe.hpp:37
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: dci/Universe.hpp:52
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: dci/Universe.hpp:319
void resolveDciDomain(std::vector< OF_SHARED_PTR< modelgbp::dci::Domain > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::dci::Domain. ...
Definition: dci/Universe.hpp:258
static boost::optional< OF_SHARED_PTR< modelgbp::dci::Universe > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of Universe from the managed object store using the default framework instance...
Definition: dci/Universe.hpp:124
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: dci/Universe.hpp:350
boost::optional< OF_SHARED_PTR< modelgbp::dci::EpFromUnivRTgt > > resolveDciEpFromUnivRTgt()
Retrieve the child object with the specified naming properties.
Definition: dci/Universe.hpp:178
modelgbp::dci::Universe & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: dci/Universe.hpp:77
Definition: dci/Universe.hpp:29
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: dci/Universe.hpp:364
boost::optional< OF_SHARED_PTR< modelgbp::dci::Domain > > resolveDciDomain(const std::string &dciDomainName)
Retrieve the child object with the specified naming properties.
Definition: dci/Universe.hpp:215
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
static boost::optional< OF_SHARED_PTR< modelgbp::dci::Universe > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Universe from the managed object store.
Definition: dci/Universe.hpp:106