mrfioc2  2.3.0
Public Member Functions | List of all members
mrf::detail::propertyInstance< C, P > Class Template Reference

final scalar implementation More...

#include <object.h>

Inheritance diagram for mrf::detail::propertyInstance< C, P >:
Inheritance graph
[legend]
Collaboration diagram for mrf::detail::propertyInstance< C, P >:
Collaboration graph
[legend]

Public Member Functions

 propertyInstance (C *c, const unboundProperty< C, P > &p)
 
virtual ~propertyInstance ()
 
virtual const char * name () const
 
virtual const std::type_info & type () const
 
virtual void set (P v)
 The setter for this property. More...
 
virtual P get () const
 
virtual void show (std::ostream &strm) const
 Print the value of the field w/o leading or trailing whitespace. More...
 
- Public Member Functions inherited from mrf::property< P >
virtual ~property ()
 
- Public Member Functions inherited from mrf::propertyBase
virtual ~propertyBase ()=0
 

Detailed Description

template<class C, typename P>
class mrf::detail::propertyInstance< C, P >

final scalar implementation

Definition at line 275 of file object.h.

Constructor & Destructor Documentation

◆ propertyInstance()

template<class C, typename P>
mrf::detail::propertyInstance< C, P >::propertyInstance ( C *  c,
const unboundProperty< C, P > &  p 
)
inline

Definition at line 281 of file object.h.

282  :inst(c)
283  ,prop(p)
284  {}

◆ ~propertyInstance()

template<class C, typename P>
virtual mrf::detail::propertyInstance< C, P >::~propertyInstance ( )
inlinevirtual

Definition at line 285 of file object.h.

285 {}

Member Function Documentation

◆ get()

template<class C, typename P>
virtual P mrf::detail::propertyInstance< C, P >::get ( ) const
inlinevirtual

Implements mrf::property< P >.

Definition at line 295 of file object.h.

295  {
296  if(!prop.getter)
297  throw opNotImplemented("T get() not implemented");
298  return (inst->*(prop.getter))();
299  }

◆ name()

template<class C, typename P>
virtual const char* mrf::detail::propertyInstance< C, P >::name ( ) const
inlinevirtual

Implements mrf::propertyBase.

Definition at line 287 of file object.h.

287 {return prop.name;}

◆ set()

template<class C, typename P>
virtual void mrf::detail::propertyInstance< C, P >::set ( )
inlinevirtual

The setter for this property.

Implements mrf::property< P >.

Definition at line 289 of file object.h.

290  {
291  if(!prop.setter)
292  throw opNotImplemented("void set(T) not implemented");
293  (inst->*(prop.setter))(v);
294  }

◆ show()

template<class C, typename P>
virtual void mrf::detail::propertyInstance< C, P >::show ( std::ostream &  strm) const
inlinevirtual

Print the value of the field w/o leading or trailing whitespace.

Reimplemented from mrf::propertyBase.

Definition at line 300 of file object.h.

301  {
302  strm<<get();
303  }

◆ type()

template<class C, typename P>
virtual const std::type_info& mrf::detail::propertyInstance< C, P >::type ( ) const
inlinevirtual

Implements mrf::propertyBase.

Definition at line 288 of file object.h.

288 {return prop.type();}

The documentation for this class was generated from the following file: