ponder 3.2
C++ reflection library
ponder Namespace Reference

Root namespace that encapsulates all of Ponder. More...

Namespaces

 lua
 Contains Ponder Lua support public API.
 
 policy
 Ponder policy options.
 
 runtime
 Contains Ponder runtime support public API.
 
 uses
 Uses for Ponder. Code within this namespace uses the types registered with Ponder for various purposes.
 

Classes

class  Args
 Wrapper for packing an arbitrary number of arguments into a single object. More...
 
class  ArrayProperty
 Specialized type of property for arrays. More...
 
class  BadArgument
 Error thrown when providing a function argument which is incompatible with what the function expects. More...
 
class  BadType
 Error thrown when providing a metavalue whose type is incompatible with what's expected. More...
 
class  Class
 ponder::Class represents a metaclass composed of properties and functions More...
 
class  ClassAlreadyCreated
 Error thrown when a declaring a metaclass that already exists. More...
 
class  ClassBuilder
 Proxy class which fills a metaclass with its members. More...
 
class  ClassNotFound
 Error thrown when a metaclass couldn't be found (either by its name or its id) More...
 
class  ClassUnrelated
 Error thrown when trying to convert an object to a class that is not a base nor a derived. More...
 
class  ClassVisitor
 Base class for writing custom Class visitors. More...
 
class  Constructor
 Represents a metaconstructor which is used to create objects instances from metaclasses. More...
 
class  Enum
 ponder::Enum represents a metaenum composed of <name, value> pairs More...
 
class  EnumAlreadyCreated
 Error thrown when a declaring a metaenum that already exists. More...
 
class  EnumBuilder
 Proxy class which fills a metaenum with its members. More...
 
class  EnumNameNotFound
 Error thrown when the value of a metaenum couldn't be found by its name. More...
 
class  EnumNotFound
 Error thrown when a metaenum couldn't be found (either by its name or its id) More...
 
class  EnumObject
 Wrapper to manipulate enumerated values in the Ponder system. More...
 
class  EnumProperty
 Specialized type of property for enums. More...
 
class  EnumValueNotFound
 Error thrown when a value in a metaenum couldn't be found. More...
 
class  Error
 Base class for every exception thrown in Ponder. More...
 
class  ForbiddenCall
 Error thrown when calling a function that is not callable. More...
 
class  ForbiddenRead
 Error thrown when trying to read a property that is not readable. More...
 
class  ForbiddenWrite
 Error thrown when trying to write a function that is not writable. More...
 
class  Function
 Abstract representation of a function. More...
 
class  FunctionNotFound
 Error thrown when a function can't be found in a metaclass (by its name) More...
 
class  IUserDataStore
 Interface to UserData store. More...
 
class  NotEnoughArguments
 Error thrown when a declaring a metaclass that already exists. More...
 
struct  NoType
 Special empty type associated to noType. More...
 
class  NullObject
 Error thrown when trying to use an empty metaobject. More...
 
class  Observer
 Receives notification about creation / destruction of metaclasses and metaenums. More...
 
class  OutOfRange
 Error thrown when using an index which is out of bounds. More...
 
class  Property
 Abstract representation of a property. More...
 
class  PropertyNotFound
 Error thrown when a property can't be found in a metaclass (by its name) More...
 
class  SimpleProperty
 Base class for all simple types of properties. More...
 
class  Type
 Base class for all supported types. More...
 
class  TypeAmbiguity
 Error thrown when cannot distinguish between multiple type instance. More...
 
class  UserData
 Name-value user data. More...
 
class  UserObject
 Wrapper to manipulate user objects in the Ponder system. More...
 
class  UserProperty
 Specialized type of property for user types. More...
 
class  Value
 Variant class which is used to wrap values in the Ponder system. More...
 
class  ValueVisitor
 Base class for writing custom Value visitors. More...
 
class  View
 
class  ViewIterator
 

Typedefs

typedef std::type_index TypeId
 

Enumerations

enum  ValueKind {
  ValueKind::None, ValueKind::Boolean, ValueKind::Integer, ValueKind::Real,
  ValueKind::String, ValueKind::Enum, ValueKind::Array, ValueKind::Reference,
  ValueKind::User
}
 Enumeration of abstract value types supported by Ponder Values. More...
 
enum  ReferenceKind {
  ReferenceKind::None, ReferenceKind::Instance, ReferenceKind::Pointer, ReferenceKind::Reference,
  ReferenceKind::SmartPointer, ReferenceKind::BuiltinArray
}
 Enumeration of ways to reference an object. More...
 
enum  FunctionKind {
  FunctionKind::None, FunctionKind::Function, FunctionKind::MemberFunction, FunctionKind::FunctionWrapper,
  FunctionKind::BindExpression, FunctionKind::Lambda
}
 Enumeration of the kinds of function recognised. More...
 
enum  PropertyKind { PropertyKind::Function, PropertyKind::MemberObject }
 Enumeration of the kinds of property exposed. More...
 
enum  PropertyAccessKind { Simple, Enum, Container, User }
 Enumeration of the kinds of Property accessors use. More...
 

Functions

void * classCast (void *pointer, const Class &sourceClass, const Class &targetClass)
 Convert a pointer from a source metaclass to a related target metaclass. More...
 
void addObserver (Observer *observer)
 Register an observer. More...
 
void removeObserver (Observer *observer)
 Unregister an observer. More...
 
IUserDataStoreuserDataStore ()
 
std::istream & operator>> (std::istream &stream, Value &value)
 Overload of operator >> to extract a ponder::Value from a standard stream. More...
 
std::ostream & operator<< (std::ostream &stream, const Value &value)
 Overload of operator << to print a ponder::Value into a standard stream. More...
 
template<typename T >
ValueKind mapType ()
 Map a C++ type to a Ponder type. More...
 

Detailed Description

Root namespace that encapsulates all of Ponder.

NoDocumentation

Enumeration Type Documentation

◆ FunctionKind

enum ponder::FunctionKind
strong

Enumeration of the kinds of function recognised.

See also
Function
Enumerator
None 

not a function

Function 

a function

MemberFunction 

function in a class or struct

FunctionWrapper 

std::function<>

BindExpression 

std::bind()

Lambda 

lambda function [](){}

◆ PropertyAccessKind

Enumeration of the kinds of Property accessors use.

See also
Property

◆ PropertyKind

enum ponder::PropertyKind
strong

Enumeration of the kinds of property exposed.

See also
Property, Function
Enumerator
Function 

a function

MemberObject 

member object in a class or struct

◆ ReferenceKind

enum ponder::ReferenceKind
strong

Enumeration of ways to reference an object.

See also
Value ValueMapper
Enumerator
None 

not an object

Instance 

an object instance, e.g. int, T

Pointer 

pointer to an object, e.g. T*

Reference 

reference to an object, e.g. T&

SmartPointer 

smart pointer reference, e.g. std::shared_ptr<T>

BuiltinArray 

builtin array, e.g. T[N]

◆ ValueKind

enum ponder::ValueKind
strong

Enumeration of abstract value types supported by Ponder Values.

See also
Value ValueMapper
Enumerator
None 

No type has been defined yet.

Boolean 

Boolean type (bool)

Integer 

Integer types (unsigned,signed, char, short, int, long)

Real 

Real types (float, double)

String 

String types (char*, ponder::String)

Enum 

Enumerated types.

Array 

Array types (T[], std::vector, std::list)

Reference 

Reference types (T*, const T*, T&, const T&)

User 

User-defined classes.

Function Documentation

◆ addObserver()

void ponder::addObserver ( Observer observer)

Register an observer.

Parameters
observerPointer to the observer instance to register

◆ classCast()

void* ponder::classCast ( void *  pointer,
const Class sourceClass,
const Class targetClass 
)

Convert a pointer from a source metaclass to a related target metaclass.

Parameters
pointerSource pointer to convert
sourceClassSource metaclass to convert from
targetClassTarget metaclass to convert to
Returns
Converted pointer, or 0 on failure
Exceptions
ClassUnrelatedsourceClass is not a base nor a derived of targetClass

◆ mapType()

template<typename T >
ValueKind ponder::mapType ( )
inline

Map a C++ type to a Ponder type.

This function simply returns the mapping defined by ValueMapper (i.e. ValueMapper<T>::type).

Returns
Ponder type which T maps to

◆ operator<<()

std::ostream& ponder::operator<< ( std::ostream &  stream,
const Value value 
)

Overload of operator << to print a ponder::Value into a standard stream.

Parameters
streamTarget output stream
valueValue to print
Returns
Reference to the output stream

◆ operator>>()

std::istream& ponder::operator>> ( std::istream &  stream,
Value value 
)

Overload of operator >> to extract a ponder::Value from a standard stream.

Parameters
streamSource input stream
valueValue to fill
Returns
Reference to the input stream

◆ removeObserver()

void ponder::removeObserver ( Observer observer)

Unregister an observer.

Parameters
observerPointer to the observer instance to unregister