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 = 65;
49 return getObjectInstance().isSet(2129921ul, opflex::modb::PropertyInfo::STRING);
56 boost::optional<const std::string&>
getName()
59 return getObjectInstance().getString(2129921ul);
68 const std::string&
getName(
const std::string& defaultValue)
70 return getName().get_value_or(defaultValue);
83 getTLMutator().modify(getClassId(), getURI())->setString(2129921ul, newValue);
95 getTLMutator().modify(getClassId(), getURI())->unset(2129921ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
110 static boost::optional<boost::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<boost::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<boost::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<boost::shared_ptr<modelgbp::dci::Discoverer> >
resolve(
170 return resolve(opflex::ofcore::OFFramework::defaultInstance());
201 boost::shared_ptr<modelgbp::dci::Ep> result = addChild<modelgbp::dci::Ep>(
202 CLASS_ID, getURI(), 2149613634ul, 66,
203 opflex::modb::URIBuilder(getURI()).addElement(
"DciEp").build()
236 boost::shared_ptr<modelgbp::dci::EpFromUnivRTgt> result = addChild<modelgbp::dci::EpFromUnivRTgt>(
237 CLASS_ID, getURI(), 2149613636ul, 68,
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 boost::shared_ptr<modelgbp::dci::Domain> result = addChild<modelgbp::dci::Domain>(
276 CLASS_ID, getURI(), 2149613638ul, 70,
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(), 2149613638ul, 70, 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 boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
417 : MO(framework,
CLASS_ID, uri, oi) { }
422 #endif // GI_DCI_DISCOVERER_HPP
static boost::optional< boost::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
static boost::optional< boost::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
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
boost::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
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Discoverer.
Definition: Discoverer.hpp:41
static boost::optional< boost::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< boost::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
static boost::optional< boost::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
modelgbp::dci::Discoverer & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: Discoverer.hpp:81
boost::optional< boost::shared_ptr< modelgbp::dci::Ep > > resolveDciEp()
Retrieve the child object with the specified naming properties.
Definition: Discoverer.hpp:182
static boost::optional< boost::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
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: Discoverer.hpp:403
static boost::optional< boost::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::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
bool isNameSet()
Check whether name has been set.
Definition: Discoverer.hpp:47
boost::optional< boost::shared_ptr< modelgbp::dci::Domain > > resolveDciDomain(const std::string &dciDomainName)
Retrieve the child object with the specified naming properties.
Definition: Discoverer.hpp:254
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: Discoverer.hpp:56
modelgbp::dci::Discoverer & unsetName()
Unset name in the currently-active mutator.
Definition: Discoverer.hpp:93
void resolveDciDomain(std::vector< boost::shared_ptr< modelgbp::dci::Domain > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::dci::Domain. ...
Definition: Discoverer.hpp:297
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: Discoverer.hpp:389
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
boost::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
Discoverer(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Discoverer.
Definition: Discoverer.hpp:413
boost::optional< boost::shared_ptr< modelgbp::dci::EpFromUnivRTgt > > resolveDciEpFromUnivRTgt()
Retrieve the child object with the specified naming properties.
Definition: Discoverer.hpp:217