modelgbp Generated OpFlex Model  1.3.0
LocalEpFromEpRTgt.hpp
1 
10 #pragma once
11 #ifndef GI_SPAN_LOCALEPFROMEPRTGT_HPP
12 #define GI_SPAN_LOCALEPFROMEPRTGT_HPP
13 
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
17 
18 namespace modelgbp {
19 namespace span {
20 
22  : public opflex::modb::mointernal::MO
23 {
24 public:
25 
29  static const opflex::modb::class_id_t CLASS_ID = 54;
30 
35  bool isRoleSet()
36  {
37  return getObjectInstance().isSet(1769474ul, opflex::modb::PropertyInfo::ENUM8);
38  }
39 
44  boost::optional<const uint8_t> getRole()
45  {
46  if (isRoleSet())
47  return (const uint8_t)getObjectInstance().getUInt64(1769474ul);
48  return boost::none;
49  }
50 
56  const uint8_t getRole(const uint8_t defaultValue)
57  {
58  return getRole().get_value_or(defaultValue);
59  }
60 
69  modelgbp::span::LocalEpFromEpRTgt& setRole(const uint8_t newValue)
70  {
71  getTLMutator().modify(getClassId(), getURI())->setUInt64(1769474ul, newValue);
72  return *this;
73  }
74 
82  {
83  getTLMutator().modify(getClassId(), getURI())->unset(1769474ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
84  return *this;
85  }
86 
91  bool isSourceSet()
92  {
93  return getObjectInstance().isSet(1769475ul, opflex::modb::PropertyInfo::STRING);
94  }
95 
100  boost::optional<const std::string&> getSource()
101  {
102  if (isSourceSet())
103  return getObjectInstance().getString(1769475ul);
104  return boost::none;
105  }
106 
112  const std::string& getSource(const std::string& defaultValue)
113  {
114  return getSource().get_value_or(defaultValue);
115  }
116 
125  modelgbp::span::LocalEpFromEpRTgt& setSource(const std::string& newValue)
126  {
127  getTLMutator().modify(getClassId(), getURI())->setString(1769475ul, newValue);
128  return *this;
129  }
130 
138  {
139  getTLMutator().modify(getClassId(), getURI())->unset(1769475ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
140  return *this;
141  }
142 
147  bool isTypeSet()
148  {
149  return getObjectInstance().isSet(1769473ul, opflex::modb::PropertyInfo::ENUM8);
150  }
151 
156  boost::optional<const uint8_t> getType()
157  {
158  if (isTypeSet())
159  return (const uint8_t)getObjectInstance().getUInt64(1769473ul);
160  return boost::none;
161  }
162 
168  const uint8_t getType(const uint8_t defaultValue)
169  {
170  return getType().get_value_or(defaultValue);
171  }
172 
182  {
183  getTLMutator().modify(getClassId(), getURI())->setUInt64(1769473ul, newValue);
184  return *this;
185  }
186 
194  {
195  getTLMutator().modify(getClassId(), getURI())->unset(1769473ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
196  return *this;
197  }
198 
210  static boost::optional<boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> > resolve(
211  opflex::ofcore::OFFramework& framework,
212  const opflex::modb::URI& uri)
213  {
214  return opflex::modb::mointernal::MO::resolve<modelgbp::span::LocalEpFromEpRTgt>(framework, CLASS_ID, uri);
215  }
216 
228  static boost::optional<boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> > resolve(
229  const opflex::modb::URI& uri)
230  {
231  return opflex::modb::mointernal::MO::resolve<modelgbp::span::LocalEpFromEpRTgt>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
232  }
233 
254  static boost::optional<boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> > resolve(
255  opflex::ofcore::OFFramework& framework,
256  const std::string& eprL2EpContext,
257  const opflex::modb::MAC& eprL2EpMac,
258  const std::string& spanLocalEpFromEpRTgtSource)
259  {
260  return resolve(framework,opflex::modb::URIBuilder().addElement("EprL2Universe").addElement("EprL2Ep").addElement(eprL2EpContext).addElement(eprL2EpMac).addElement("SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build());
261  }
262 
282  static boost::optional<boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> > resolve(
283  const std::string& eprL2EpContext,
284  const opflex::modb::MAC& eprL2EpMac,
285  const std::string& spanLocalEpFromEpRTgtSource)
286  {
287  return resolve(opflex::ofcore::OFFramework::defaultInstance(),eprL2EpContext,eprL2EpMac,spanLocalEpFromEpRTgtSource);
288  }
289 
310  static boost::optional<boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> > resolve(
311  opflex::ofcore::OFFramework& framework,
312  const std::string& eprL3EpContext,
313  const std::string& eprL3EpIp,
314  const std::string& spanLocalEpFromEpRTgtSource)
315  {
316  return resolve(framework,opflex::modb::URIBuilder().addElement("EprL3Universe").addElement("EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).addElement("SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build());
317  }
318 
338  static boost::optional<boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> > resolve(
339  const std::string& eprL3EpContext,
340  const std::string& eprL3EpIp,
341  const std::string& spanLocalEpFromEpRTgtSource)
342  {
343  return resolve(opflex::ofcore::OFFramework::defaultInstance(),eprL3EpContext,eprL3EpIp,spanLocalEpFromEpRTgtSource);
344  }
345 
354  void remove()
355  {
356  getTLMutator().remove(CLASS_ID, getURI());
357  }
358 
369  static void remove(opflex::ofcore::OFFramework& framework,
370  const opflex::modb::URI& uri)
371  {
372  MO::remove(framework, CLASS_ID, uri);
373  }
374 
385  static void remove(const opflex::modb::URI& uri)
386  {
387  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
388  }
389 
408  static void remove(
409  opflex::ofcore::OFFramework& framework,
410  const std::string& eprL2EpContext,
411  const opflex::modb::MAC& eprL2EpMac,
412  const std::string& spanLocalEpFromEpRTgtSource)
413  {
414  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("EprL2Universe").addElement("EprL2Ep").addElement(eprL2EpContext).addElement(eprL2EpMac).addElement("SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build());
415  }
416 
435  static void remove(
436  const std::string& eprL2EpContext,
437  const opflex::modb::MAC& eprL2EpMac,
438  const std::string& spanLocalEpFromEpRTgtSource)
439  {
440  remove(opflex::ofcore::OFFramework::defaultInstance(),eprL2EpContext,eprL2EpMac,spanLocalEpFromEpRTgtSource);
441  }
442 
461  static void remove(
462  opflex::ofcore::OFFramework& framework,
463  const std::string& eprL3EpContext,
464  const std::string& eprL3EpIp,
465  const std::string& spanLocalEpFromEpRTgtSource)
466  {
467  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("EprL3Universe").addElement("EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).addElement("SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build());
468  }
469 
488  static void remove(
489  const std::string& eprL3EpContext,
490  const std::string& eprL3EpIp,
491  const std::string& spanLocalEpFromEpRTgtSource)
492  {
493  remove(opflex::ofcore::OFFramework::defaultInstance(),eprL3EpContext,eprL3EpIp,spanLocalEpFromEpRTgtSource);
494  }
495 
507  static void registerListener(
508  opflex::ofcore::OFFramework& framework,
509  opflex::modb::ObjectListener* listener)
510  {
511  opflex::modb::mointernal
512  ::MO::registerListener(framework, listener, CLASS_ID);
513  }
514 
526  static void registerListener(
527  opflex::modb::ObjectListener* listener)
528  {
529  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
530  }
531 
538  static void unregisterListener(
539  opflex::ofcore::OFFramework& framework,
540  opflex::modb::ObjectListener* listener)
541  {
542  opflex::modb::mointernal
543  ::MO::unregisterListener(framework, listener, CLASS_ID);
544  }
545 
552  static void unregisterListener(
553  opflex::modb::ObjectListener* listener)
554  {
555  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
556  }
557 
563  opflex::ofcore::OFFramework& framework,
564  const opflex::modb::URI& uri,
565  const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
566  : MO(framework, CLASS_ID, uri, oi) { }
567 }; // class LocalEpFromEpRTgt
568 
569 } // namespace span
570 } // namespace modelgbp
571 #endif // GI_SPAN_LOCALEPFROMEPRTGT_HPP
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: LocalEpFromEpRTgt.hpp:507
static boost::optional< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > resolve(opflex::ofcore::OFFramework &framework, const std::string &eprL2EpContext, const opflex::modb::MAC &eprL2EpMac, const std::string &spanLocalEpFromEpRTgtSource)
Retrieve an instance of LocalEpFromEpRTgt from the managed object store by constructing its URI from ...
Definition: LocalEpFromEpRTgt.hpp:254
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: LocalEpFromEpRTgt.hpp:538
modelgbp::span::LocalEpFromEpRTgt & unsetType()
Unset type in the currently-active mutator.
Definition: LocalEpFromEpRTgt.hpp:193
modelgbp::span::LocalEpFromEpRTgt & setRole(const uint8_t newValue)
Set role to the specified value in the currently-active mutator.
Definition: LocalEpFromEpRTgt.hpp:69
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for LocalEpFromEpRTgt.
Definition: LocalEpFromEpRTgt.hpp:29
static boost::optional< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of LocalEpFromEpRTgt from the managed object store using the default framework i...
Definition: LocalEpFromEpRTgt.hpp:228
const std::string & getSource(const std::string &defaultValue)
Get the value of source if set, otherwise the value of default passed in.
Definition: LocalEpFromEpRTgt.hpp:112
modelgbp::span::LocalEpFromEpRTgt & unsetRole()
Unset role in the currently-active mutator.
Definition: LocalEpFromEpRTgt.hpp:81
modelgbp::span::LocalEpFromEpRTgt & unsetSource()
Unset source in the currently-active mutator.
Definition: LocalEpFromEpRTgt.hpp:137
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition: LocalEpFromEpRTgt.hpp:156
Definition: LocalEpFromEpRTgt.hpp:21
modelgbp::span::LocalEpFromEpRTgt & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition: LocalEpFromEpRTgt.hpp:181
const uint8_t getType(const uint8_t defaultValue)
Get the value of type if set, otherwise the value of default passed in.
Definition: LocalEpFromEpRTgt.hpp:168
bool isRoleSet()
Check whether role has been set.
Definition: LocalEpFromEpRTgt.hpp:35
boost::optional< const std::string & > getSource()
Get the value of source if it has been set.
Definition: LocalEpFromEpRTgt.hpp:100
modelgbp::span::LocalEpFromEpRTgt & setSource(const std::string &newValue)
Set source to the specified value in the currently-active mutator.
Definition: LocalEpFromEpRTgt.hpp:125
bool isTypeSet()
Check whether type has been set.
Definition: LocalEpFromEpRTgt.hpp:147
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: LocalEpFromEpRTgt.hpp:552
boost::optional< const uint8_t > getRole()
Get the value of role if it has been set.
Definition: LocalEpFromEpRTgt.hpp:44
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: LocalEpFromEpRTgt.hpp:526
static boost::optional< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalEpFromEpRTgt from the managed object store.
Definition: LocalEpFromEpRTgt.hpp:210
bool isSourceSet()
Check whether source has been set.
Definition: LocalEpFromEpRTgt.hpp:91
const uint8_t getRole(const uint8_t defaultValue)
Get the value of role if set, otherwise the value of default passed in.
Definition: LocalEpFromEpRTgt.hpp:56
LocalEpFromEpRTgt(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of LocalEpFromEpRTgt.
Definition: LocalEpFromEpRTgt.hpp:562
static boost::optional< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > resolve(opflex::ofcore::OFFramework &framework, const std::string &eprL3EpContext, const std::string &eprL3EpIp, const std::string &spanLocalEpFromEpRTgtSource)
Retrieve an instance of LocalEpFromEpRTgt from the managed object store by constructing its URI from ...
Definition: LocalEpFromEpRTgt.hpp:310
static boost::optional< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > resolve(const std::string &eprL3EpContext, const std::string &eprL3EpIp, const std::string &spanLocalEpFromEpRTgtSource)
Retrieve an instance of LocalEpFromEpRTgt from the default managed object store by constructing its U...
Definition: LocalEpFromEpRTgt.hpp:338
static boost::optional< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > resolve(const std::string &eprL2EpContext, const opflex::modb::MAC &eprL2EpMac, const std::string &spanLocalEpFromEpRTgtSource)
Retrieve an instance of LocalEpFromEpRTgt from the default managed object store by constructing its U...
Definition: LocalEpFromEpRTgt.hpp:282