Pothos  0.2.1-g9f04573d
The Pothos dataflow programming software suite
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | List of all members
Pothos::ObjectM Class Reference

#include <ObjectM.hpp>

Inheritance diagram for Pothos::ObjectM:
Inheritance graph
[legend]

Public Member Functions

 ObjectM (void)
 
 ObjectM (const ObjectM &obj)
 Copy constructor for ObjectM. More...
 
 ObjectM (ObjectM &&obj)
 Move constructor for ObjectM. More...
 
 ObjectM (ObjectM &obj)
 Copy constructor for ObjectM. More...
 
 ObjectM (const ObjectM &&obj)
 Move constructor for ObjectM. More...
 
template<typename ValueType >
 ObjectM (ValueType &&value)
 
virtual ~ObjectM (void)
 Destructor for ObjectM. More...
 
ObjectMoperator= (const ObjectM &rhs)
 Copy assignment operator for ObjectM. More...
 
ObjectMoperator= (ObjectM &&rhs)
 Move assignment operator for ObjectM. More...
 
template<typename ValueType >
ValueType & extract (void) const
 
- Public Member Functions inherited from Pothos::Object
 Object (void)
 
 Object (const Object &obj)
 
 Object (Object &obj)
 
 Object (Object &&obj)
 
 Object (const Object &&obj)
 
template<typename ValueType >
 Object (ValueType &&value)
 
virtual ~Object (void)
 
Objectoperator= (const Object &rhs)
 
Objectoperator= (Object &&rhs)
 
pothos_explicit operator bool (void) const
 
bool unique (void) const
 
const std::type_info & type (void) const
 
template<typename ValueType >
const ValueType & extract (void) const
 
template<typename ValueType >
ValueType convert (void) const
 
Object convert (const std::type_info &type) const
 
bool canConvert (const std::type_info &type) const
 
std::ostream & serialize (std::ostream &os) const
 
std::istream & deserialize (std::istream &is)
 
int compareTo (const Object &other) const
 
size_t hashCode (void) const
 
std::string toString (void) const
 
std::string getTypeString (void) const
 
bool equals (const Object &obj) const
 
bool operator< (const Object &obj) const
 
bool operator> (const Object &obj) const
 

Additional Inherited Members

- Static Public Member Functions inherited from Pothos::Object
template<typename ValueType >
static Object make (ValueType &&value)
 
static bool canConvert (const std::type_info &srcType, const std::type_info &dstType)
 
- Public Attributes inherited from Pothos::Object
Detail::ObjectContainer * _impl
 Private implementation details. More...
 

Detailed Description

ObjectM is a special mutable subclass of Object.

When ObjectM is created, its internal data can be modified via extract(). ObjectM can be implicitly casted as Object to pass into read-only calls. However, an Object instance cannot be converted into an ObjectM.

For example: Users may create an ObjectM rather than Object to modify its contents as part of a initialization routine.

Constructor & Destructor Documentation

Pothos::ObjectM::ObjectM ( void  )
explicit

Create a null ObjectM.

Pothos::ObjectM::ObjectM ( const ObjectM obj)

Copy constructor for ObjectM.

Pothos::ObjectM::ObjectM ( ObjectM &&  obj)

Move constructor for ObjectM.

Pothos::ObjectM::ObjectM ( ObjectM obj)

Copy constructor for ObjectM.

Pothos::ObjectM::ObjectM ( const ObjectM &&  obj)

Move constructor for ObjectM.

template<typename ValueType >
Pothos::ObjectM::ObjectM ( ValueType &&  value)
explicit

Create a new ObjectM from an arbitrary value.

Parameters
valuethe data to store internally
virtual Pothos::ObjectM::~ObjectM ( void  )
virtual

Destructor for ObjectM.

Member Function Documentation

template<typename ValueType >
ValueType & Pothos::ObjectM::extract ( void  ) const

Cast the internal data to an arbitrary type. The requested cast type must exactly match the type().

Exceptions
ObjectConvertErrorif object type != ValueType
Returns
a non-const reference to the internal data
ObjectM& Pothos::ObjectM::operator= ( const ObjectM rhs)

Copy assignment operator for ObjectM.

ObjectM& Pothos::ObjectM::operator= ( ObjectM &&  rhs)

Move assignment operator for ObjectM.


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