11 #ifndef GI_DCI_DISCOVERER_HPP 12 #define GI_DCI_DISCOVERER_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 20 #include "modelgbp/dci/Ep.hpp" 24 #include "modelgbp/dci/EpFromUnivRTgt.hpp" 28 #include "modelgbp/dci/Domain.hpp" 34 :
public opflex::modb::mointernal::MO
41 static const opflex::modb::class_id_t
CLASS_ID = 82;
49 return getObjectInstance().isSet(2686977ul, opflex::modb::PropertyInfo::STRING);
56 boost::optional<const std::string&>
getName()
59 return getObjectInstance().getString(2686977ul);
68 const std::string&
getName(
const std::string& defaultValue)
70 return getName().get_value_or(defaultValue);
83 getTLMutator().modify(getClassId(), getURI())->setString(2686977ul, newValue);
95 getTLMutator().modify(getClassId(), getURI())->unset(2686977ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
110 static boost::optional<OF_SHARED_PTR<modelgbp::dci::Discoverer> >
resolve(
111 opflex::ofcore::OFFramework& framework,
112 const opflex::modb::URI& uri)
114 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::Discoverer>(framework,
CLASS_ID, uri);
128 static boost::optional<OF_SHARED_PTR<modelgbp::dci::Discoverer> >
resolve(
129 const opflex::modb::URI& uri)
131 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::Discoverer>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
148 static boost::optional<OF_SHARED_PTR<modelgbp::dci::Discoverer> >
resolve(
149 opflex::ofcore::OFFramework& framework)
151 return resolve(framework,opflex::modb::URIBuilder().addElement(
"DciDiscoverer").build());
167 static boost::optional<OF_SHARED_PTR<modelgbp::dci::Discoverer> >
resolve(
170 return resolve(opflex::ofcore::OFFramework::defaultInstance());
201 OF_SHARED_PTR<modelgbp::dci::Ep> result = addChild<modelgbp::dci::Ep>(
202 CLASS_ID, getURI(), 2150170707ul, 83,
203 opflex::modb::URIBuilder(getURI()).addElement(
"DciEp").build()
236 OF_SHARED_PTR<modelgbp::dci::EpFromUnivRTgt> result = addChild<modelgbp::dci::EpFromUnivRTgt>(
237 CLASS_ID, getURI(), 2150170709ul, 85,
238 opflex::modb::URIBuilder(getURI()).addElement(
"DciEpFromUnivRTgt").build()
255 const std::string& dciDomainName)
257 return modelgbp::dci::Domain::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"DciDomain").addElement(dciDomainName).build());
273 const std::string& dciDomainName)
275 OF_SHARED_PTR<modelgbp::dci::Domain> result = addChild<modelgbp::dci::Domain>(
276 CLASS_ID, getURI(), 2150170711ul, 87,
277 opflex::modb::URIBuilder(getURI()).addElement(
"DciDomain").addElement(dciDomainName).build()
279 result->setName(dciDomainName);
299 opflex::modb::mointernal::MO::resolveChildren<modelgbp::dci::Domain>(
300 getFramework(),
CLASS_ID, getURI(), 2150170711ul, 87, out);
313 getTLMutator().remove(
CLASS_ID, getURI());
326 static void remove(opflex::ofcore::OFFramework& framework,
327 const opflex::modb::URI& uri)
329 MO::remove(framework,
CLASS_ID, uri);
342 static void remove(
const opflex::modb::URI& uri)
344 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
359 opflex::ofcore::OFFramework& framework,
360 opflex::modb::ObjectListener* listener)
362 opflex::modb::mointernal
363 ::MO::registerListener(framework, listener,
CLASS_ID);
378 opflex::modb::ObjectListener* listener)
390 opflex::ofcore::OFFramework& framework,
391 opflex::modb::ObjectListener* listener)
393 opflex::modb::mointernal
394 ::MO::unregisterListener(framework, listener,
CLASS_ID);
404 opflex::modb::ObjectListener* listener)
414 opflex::ofcore::OFFramework& framework,
415 const opflex::modb::URI& uri,
416 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
417 : MO(framework,
CLASS_ID, uri, oi) { }
422 #endif // GI_DCI_DISCOVERER_HPP static boost::optional< OF_SHARED_PTR< modelgbp::dci::Discoverer > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of Discoverer from the managed object store using the default framework instance...
Definition: Discoverer.hpp:128
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: Discoverer.hpp:68
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Discoverer.
Definition: Discoverer.hpp:41
Discoverer(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Discoverer.
Definition: Discoverer.hpp:413
OF_SHARED_PTR< modelgbp::dci::Ep > addDciEp()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Discoverer.hpp:198
boost::optional< OF_SHARED_PTR< modelgbp::dci::Ep > > resolveDciEp()
Retrieve the child object with the specified naming properties.
Definition: Discoverer.hpp:182
static boost::optional< OF_SHARED_PTR< modelgbp::dci::Discoverer > > resolve()
Retrieve an instance of Discoverer from the default managed object store by constructing its URI from...
Definition: Discoverer.hpp:167
modelgbp::dci::Discoverer & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: Discoverer.hpp:81
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 unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: Discoverer.hpp:403
bool isNameSet()
Check whether name has been set.
Definition: Discoverer.hpp:47
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 boost::optional< OF_SHARED_PTR< modelgbp::dci::Discoverer > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Discoverer from the managed object store.
Definition: Discoverer.hpp:110
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: Discoverer.hpp:56
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: Discoverer.hpp:272
modelgbp::dci::Discoverer & unsetName()
Unset name in the currently-active mutator.
Definition: Discoverer.hpp:93
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: Discoverer.hpp:389
boost::optional< OF_SHARED_PTR< modelgbp::dci::Domain > > resolveDciDomain(const std::string &dciDomainName)
Retrieve the child object with the specified naming properties.
Definition: Discoverer.hpp:254
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: Discoverer.hpp:377
Definition: Discoverer.hpp:33
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: Discoverer.hpp:358
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: Discoverer.hpp:297
boost::optional< OF_SHARED_PTR< modelgbp::dci::EpFromUnivRTgt > > resolveDciEpFromUnivRTgt()
Retrieve the child object with the specified naming properties.
Definition: Discoverer.hpp:217
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: Discoverer.hpp:233
static boost::optional< OF_SHARED_PTR< modelgbp::dci::Ep > > resolve()
Retrieve an instance of Ep from the default managed object store by constructing its URI from the pat...
Definition: Ep.hpp:103
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
static boost::optional< OF_SHARED_PTR< modelgbp::dci::Discoverer > > resolve(opflex::ofcore::OFFramework &framework)
Retrieve an instance of Discoverer from the managed object store by constructing its URI from the pat...
Definition: Discoverer.hpp:148