11 #ifndef GI_EPDR_LOCALL2EP_HPP 12 #define GI_EPDR_LOCALL2EP_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 20 #include "modelgbp/gbpe/EpgMappingCtx.hpp" 24 #include "modelgbp/epdr/EndPointToGroupRSrc.hpp" 30 :
public opflex::modb::mointernal::MO
37 static const opflex::modb::class_id_t
CLASS_ID = 88;
45 return getObjectInstance().isSet(2883586ul, opflex::modb::PropertyInfo::MAC);
52 boost::optional<const opflex::modb::MAC&>
getMac()
55 return getObjectInstance().getMAC(2883586ul);
64 const opflex::modb::MAC&
getMac(
const opflex::modb::MAC& defaultValue)
66 return getMac().get_value_or(defaultValue);
79 getTLMutator().modify(getClassId(), getURI())->setMAC(2883586ul, newValue);
91 getTLMutator().modify(getClassId(), getURI())->unset(2883586ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
101 return getObjectInstance().isSet(2883585ul, opflex::modb::PropertyInfo::STRING);
111 return getObjectInstance().getString(2883585ul);
120 const std::string&
getUuid(
const std::string& defaultValue)
122 return getUuid().get_value_or(defaultValue);
135 getTLMutator().modify(getClassId(), getURI())->setString(2883585ul, newValue);
147 getTLMutator().modify(getClassId(), getURI())->unset(2883585ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
162 static boost::optional<boost::shared_ptr<modelgbp::epdr::LocalL2Ep> >
resolve(
163 opflex::ofcore::OFFramework& framework,
164 const opflex::modb::URI& uri)
166 return opflex::modb::mointernal::MO::resolve<modelgbp::epdr::LocalL2Ep>(framework,
CLASS_ID, uri);
180 static boost::optional<boost::shared_ptr<modelgbp::epdr::LocalL2Ep> >
resolve(
181 const opflex::modb::URI& uri)
183 return opflex::modb::mointernal::MO::resolve<modelgbp::epdr::LocalL2Ep>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
202 static boost::optional<boost::shared_ptr<modelgbp::epdr::LocalL2Ep> >
resolve(
203 opflex::ofcore::OFFramework& framework,
204 const std::string& epdrLocalL2EpUuid)
206 return resolve(framework,opflex::modb::URIBuilder().addElement(
"EpdrL2Discovered").addElement(
"EpdrLocalL2Ep").addElement(epdrLocalL2EpUuid).build());
224 static boost::optional<boost::shared_ptr<modelgbp::epdr::LocalL2Ep> >
resolve(
225 const std::string& epdrLocalL2EpUuid)
227 return resolve(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL2EpUuid);
258 boost::shared_ptr<modelgbp::gbpe::EpgMappingCtx> result = addChild<modelgbp::gbpe::EpgMappingCtx>(
259 CLASS_ID, getURI(), 2150367245ul, 13,
260 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeEpgMappingCtx").build()
293 boost::shared_ptr<modelgbp::epdr::EndPointToGroupRSrc> result = addChild<modelgbp::epdr::EndPointToGroupRSrc>(
294 CLASS_ID, getURI(), 2150367317ul, 85,
295 opflex::modb::URIBuilder(getURI()).addElement(
"EpdrEndPointToGroupRSrc").build()
310 getTLMutator().remove(CLASS_ID, getURI());
323 static void remove(opflex::ofcore::OFFramework& framework,
324 const opflex::modb::URI& uri)
326 MO::remove(framework, CLASS_ID, uri);
339 static void remove(
const opflex::modb::URI& uri)
341 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
359 opflex::ofcore::OFFramework& framework,
360 const std::string& epdrLocalL2EpUuid)
362 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement(
"EpdrL2Discovered").addElement(
"EpdrLocalL2Ep").addElement(epdrLocalL2EpUuid).build());
380 const std::string& epdrLocalL2EpUuid)
382 remove(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL2EpUuid);
397 opflex::ofcore::OFFramework& framework,
398 opflex::modb::ObjectListener* listener)
400 opflex::modb::mointernal
401 ::MO::registerListener(framework, listener, CLASS_ID);
416 opflex::modb::ObjectListener* listener)
428 opflex::ofcore::OFFramework& framework,
429 opflex::modb::ObjectListener* listener)
431 opflex::modb::mointernal
432 ::MO::unregisterListener(framework, listener, CLASS_ID);
442 opflex::modb::ObjectListener* listener)
452 opflex::ofcore::OFFramework& framework,
453 const opflex::modb::URI& uri,
454 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
455 : MO(framework, CLASS_ID, uri, oi) { }
460 #endif // GI_EPDR_LOCALL2EP_HPP modelgbp::epdr::LocalL2Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: LocalL2Ep.hpp:145
const opflex::modb::MAC & getMac(const opflex::modb::MAC &defaultValue)
Get the value of mac if set, otherwise the value of default passed in.
Definition: LocalL2Ep.hpp:64
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: LocalL2Ep.hpp:396
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition: LocalL2Ep.hpp:52
modelgbp::epdr::LocalL2Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: LocalL2Ep.hpp:77
modelgbp::epdr::LocalL2Ep & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: LocalL2Ep.hpp:133
static boost::optional< boost::shared_ptr< modelgbp::epdr::LocalL2Ep > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of LocalL2Ep from the managed object store using the default framework instance...
Definition: LocalL2Ep.hpp:180
const std::string & getUuid(const std::string &defaultValue)
Get the value of uuid if set, otherwise the value of default passed in.
Definition: LocalL2Ep.hpp:120
bool isMacSet()
Check whether mac has been set.
Definition: LocalL2Ep.hpp:43
static boost::optional< boost::shared_ptr< modelgbp::epdr::LocalL2Ep > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalL2Ep from the managed object store.
Definition: LocalL2Ep.hpp:162
LocalL2Ep(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of LocalL2Ep.
Definition: LocalL2Ep.hpp:451
static boost::optional< boost::shared_ptr< modelgbp::epdr::LocalL2Ep > > resolve(const std::string &epdrLocalL2EpUuid)
Retrieve an instance of LocalL2Ep from the default managed object store by constructing its URI from ...
Definition: LocalL2Ep.hpp:224
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for LocalL2Ep.
Definition: LocalL2Ep.hpp:37
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: LocalL2Ep.hpp:415
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: LocalL2Ep.hpp:441
static boost::optional< boost::shared_ptr< modelgbp::epdr::EndPointToGroupRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EndPointToGroupRSrc from the managed object store.
Definition: EndPointToGroupRSrc.hpp:257
boost::shared_ptr< modelgbp::gbpe::EpgMappingCtx > addGbpeEpgMappingCtx()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: LocalL2Ep.hpp:255
Definition: LocalL2Ep.hpp:29
boost::shared_ptr< modelgbp::epdr::EndPointToGroupRSrc > addEpdrEndPointToGroupRSrc()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: LocalL2Ep.hpp:290
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: LocalL2Ep.hpp:427
static boost::optional< boost::shared_ptr< modelgbp::epdr::LocalL2Ep > > resolve(opflex::ofcore::OFFramework &framework, const std::string &epdrLocalL2EpUuid)
Retrieve an instance of LocalL2Ep from the managed object store by constructing its URI from the path...
Definition: LocalL2Ep.hpp:202
boost::optional< boost::shared_ptr< modelgbp::epdr::EndPointToGroupRSrc > > resolveEpdrEndPointToGroupRSrc()
Retrieve the child object with the specified naming properties.
Definition: LocalL2Ep.hpp:274
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: LocalL2Ep.hpp:108
boost::optional< boost::shared_ptr< modelgbp::gbpe::EpgMappingCtx > > resolveGbpeEpgMappingCtx()
Retrieve the child object with the specified naming properties.
Definition: LocalL2Ep.hpp:239
modelgbp::epdr::LocalL2Ep & unsetMac()
Unset mac in the currently-active mutator.
Definition: LocalL2Ep.hpp:89
bool isUuidSet()
Check whether uuid has been set.
Definition: LocalL2Ep.hpp:99
static boost::optional< boost::shared_ptr< modelgbp::gbpe::EpgMappingCtx > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpgMappingCtx from the managed object store.
Definition: EpgMappingCtx.hpp:50
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12