11 #ifndef GI_DCI_DOMAIN_HPP 12 #define GI_DCI_DOMAIN_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 20 #include "modelgbp/dci/DomainToGbpRoutingDomainRSrc.hpp" 26 :
public opflex::modb::mointernal::MO
33 static const opflex::modb::class_id_t
CLASS_ID = 87;
41 return getObjectInstance().isSet(2850817ul, opflex::modb::PropertyInfo::STRING);
48 boost::optional<const std::string&>
getName()
51 return getObjectInstance().getString(2850817ul);
60 const std::string&
getName(
const std::string& defaultValue)
62 return getName().get_value_or(defaultValue);
75 getTLMutator().modify(getClassId(), getURI())->setString(2850817ul, newValue);
87 getTLMutator().modify(getClassId(), getURI())->unset(2850817ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
102 static boost::optional<OF_SHARED_PTR<modelgbp::dci::Domain> >
resolve(
103 opflex::ofcore::OFFramework& framework,
104 const opflex::modb::URI& uri)
106 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::Domain>(framework,
CLASS_ID, uri);
120 static boost::optional<OF_SHARED_PTR<modelgbp::dci::Domain> >
resolve(
121 const opflex::modb::URI& uri)
123 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::Domain>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
142 static boost::optional<OF_SHARED_PTR<modelgbp::dci::Domain> >
resolve(
143 opflex::ofcore::OFFramework& framework,
144 const std::string& dciDomainName)
146 return resolve(framework,opflex::modb::URIBuilder().addElement(
"DciUniverse").addElement(
"DciDomain").addElement(dciDomainName).build());
164 static boost::optional<OF_SHARED_PTR<modelgbp::dci::Domain> >
resolve(
165 const std::string& dciDomainName)
167 return resolve(opflex::ofcore::OFFramework::defaultInstance(),dciDomainName);
184 const std::string& dciDomainToGbpRoutingDomainRSrcTargetName)
186 opflex::modb::class_id_t dciDomainToGbpRoutingDomainRSrcTargetClass = 190;
187 return modelgbp::dci::DomainToGbpRoutingDomainRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"DciDomainToGbpRoutingDomainRSrc").addElement(dciDomainToGbpRoutingDomainRSrcTargetClass).addElement(dciDomainToGbpRoutingDomainRSrcTargetName).build());
205 const std::string& dciDomainToGbpRoutingDomainRSrcTargetName)
207 opflex::modb::class_id_t dciDomainToGbpRoutingDomainRSrcTargetClass = 190;
208 OF_SHARED_PTR<modelgbp::dci::DomainToGbpRoutingDomainRSrc> result = addChild<modelgbp::dci::DomainToGbpRoutingDomainRSrc>(
209 CLASS_ID, getURI(), 2150334552ul, 88,
210 opflex::modb::URIBuilder(getURI()).addElement(
"DciDomainToGbpRoutingDomainRSrc").addElement(dciDomainToGbpRoutingDomainRSrcTargetClass).addElement(dciDomainToGbpRoutingDomainRSrcTargetName).build()
212 result->setTargetRoutingDomain(opflex::modb::URI(dciDomainToGbpRoutingDomainRSrcTargetName));
232 opflex::modb::mointernal::MO::resolveChildren<modelgbp::dci::DomainToGbpRoutingDomainRSrc>(
233 getFramework(),
CLASS_ID, getURI(), 2150334552ul, 88, out);
246 getTLMutator().remove(
CLASS_ID, getURI());
259 static void remove(opflex::ofcore::OFFramework& framework,
260 const opflex::modb::URI& uri)
262 MO::remove(framework,
CLASS_ID, uri);
275 static void remove(
const opflex::modb::URI& uri)
277 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
295 opflex::ofcore::OFFramework& framework,
296 const std::string& dciDomainName)
298 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"DciUniverse").addElement(
"DciDomain").addElement(dciDomainName).build());
316 const std::string& dciDomainName)
318 remove(opflex::ofcore::OFFramework::defaultInstance(),dciDomainName);
333 opflex::ofcore::OFFramework& framework,
334 opflex::modb::ObjectListener* listener)
336 opflex::modb::mointernal
337 ::MO::registerListener(framework, listener,
CLASS_ID);
352 opflex::modb::ObjectListener* listener)
364 opflex::ofcore::OFFramework& framework,
365 opflex::modb::ObjectListener* listener)
367 opflex::modb::mointernal
368 ::MO::unregisterListener(framework, listener,
CLASS_ID);
378 opflex::modb::ObjectListener* listener)
388 opflex::ofcore::OFFramework& framework,
389 const opflex::modb::URI& uri,
390 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
391 : MO(framework,
CLASS_ID, uri, oi) { }
396 #endif // GI_DCI_DOMAIN_HPP bool isNameSet()
Check whether name has been set.
Definition: Domain.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: Domain.hpp:351
static boost::optional< OF_SHARED_PTR< modelgbp::dci::Domain > > resolve(const std::string &dciDomainName)
Retrieve an instance of Domain from the default managed object store by constructing its URI from the...
Definition: Domain.hpp:164
static boost::optional< OF_SHARED_PTR< modelgbp::dci::Domain > > resolve(opflex::ofcore::OFFramework &framework, const std::string &dciDomainName)
Retrieve an instance of Domain from the managed object store by constructing its URI from the path el...
Definition: Domain.hpp:142
modelgbp::dci::Domain & unsetName()
Unset name in the currently-active mutator.
Definition: Domain.hpp:85
modelgbp::dci::Domain & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: Domain.hpp:73
static boost::optional< OF_SHARED_PTR< modelgbp::dci::DomainToGbpRoutingDomainRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of DomainToGbpRoutingDomainRSrc from the managed object store.
Definition: DomainToGbpRoutingDomainRSrc.hpp:257
void resolveDciDomainToGbpRoutingDomainRSrc(std::vector< OF_SHARED_PTR< modelgbp::dci::DomainToGbpRoutingDomainRSrc > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::dci::DomainToGbpRoutingDomainRSr...
Definition: Domain.hpp:230
boost::optional< OF_SHARED_PTR< modelgbp::dci::DomainToGbpRoutingDomainRSrc > > resolveDciDomainToGbpRoutingDomainRSrc(const std::string &dciDomainToGbpRoutingDomainRSrcTargetName)
Retrieve the child object with the specified naming properties.
Definition: Domain.hpp:183
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Domain.
Definition: Domain.hpp:33
Definition: Domain.hpp:25
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
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: Domain.hpp:48
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: Domain.hpp:363
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: Domain.hpp:60
Domain(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Domain.
Definition: Domain.hpp:387
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: Domain.hpp:332
OF_SHARED_PTR< modelgbp::dci::DomainToGbpRoutingDomainRSrc > addDciDomainToGbpRoutingDomainRSrc(const std::string &dciDomainToGbpRoutingDomainRSrcTargetName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Domain.hpp:204
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: Domain.hpp:377
static boost::optional< OF_SHARED_PTR< modelgbp::dci::Domain > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of Domain from the managed object store using the default framework instance...
Definition: Domain.hpp:120
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12