NAP
Public Member Functions | Public Attributes | List of all members
APIValue< T > Class Template Reference

#include <apivalue.h>

Public Member Functions

 APIValue ()
 
 APIValue (APIValue &&other)
 
 APIValue (const APIValue &other)
 
 APIValue (const std::string &name, T &&value)
 
 APIValue (const std::string &name, const T &value)
 
APIValue< T > & operator= (APIValue< T > &&other)
 
APIValue< T > & operator= (const APIValue< T > &other)
 
- Public Member Functions inherited from APIBaseValue
 APIBaseValue (const rtti::TypeInfo &type, const std::string &name)
 
const rtti::TypeInfogetRepresentedType () const
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

mValue
 managed value More...
 
- Public Attributes inherited from APIBaseValue
std::string mName
 Property: 'Name' name associated with the value. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 
- Protected Member Functions inherited from APIBaseValue
 APIBaseValue (const rtti::TypeInfo &type)
 

Description

template<typename T>
class nap::APIValue< T >

Represents an actual value that can be given to or constructed for an external environment. This object owns T and can be moved, copied and serialized from and to JSON.

Inheritance diagram for APIValue< T >:
[legend]
Collaboration diagram for APIValue< T >:
[legend]

Constructor & Destructor Documentation

◆ APIValue() [1/5]

APIValue ( )

◆ APIValue() [2/5]

APIValue ( APIValue< T > &&  other)

Move Constructor

Parameters
othervalue to move

◆ APIValue() [3/5]

APIValue ( const APIValue< T > &  other)

Copy constructor

Parameters
othervalue to copy

◆ APIValue() [4/5]

APIValue ( const std::string &  name,
T &&  value 
)

Move construct a value of type T

Parameters
namethe name of the value
valuethe value given to this object

◆ APIValue() [5/5]

APIValue ( const std::string &  name,
const T &  value 
)

Constructs a value of type T, a copy is made

Parameters
namethe name of the value
valuethe value this object is constructed with

Member Function Documentation

◆ operator=() [1/2]

nap::APIValue< T > & operator= ( APIValue< T > &&  other)

Move assignment operator

Parameters
otherapi value to move

◆ operator=() [2/2]

nap::APIValue< T > & operator= ( const APIValue< T > &  other)

Copy assignment operator

Parameters
otherapi value to copy

Member Data Documentation

◆ mValue

T mValue

managed value