lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
Classes | Functions
lean::properties Namespace Reference

Defines classes that allow for the specification of enhanced type information, e.g. making named setter and getter methods enumerable at run-time, to be used in a generic way while at the same time retaining type safety. More...

Classes

class  property_setter
 Passes data to a specific destination. More...
class  property_getter
 Fetches data from a specific source. More...
class  property_type
struct  destruct_property_data_policy
struct  deallocate_property_data_policy
struct  delete_property_data_policy
class  scoped_property_data
struct  property_desc
 Destribes a property. More...
struct  named_property_desc
 Describes a named property. More...
struct  ui_property_desc
 Describes a UI property. More...
class  property_constant
 Holds a constant array of values, returning a matching subset of these on getter access. More...
class  property_n_setter
 Provides write access to arbitrary object data of the given type using a given setter method. More...
class  property_n_getter
 Provides read access to arbitrary object data of the given type using a given getter method. More...
struct  property_n_accessor_binder
 property_n_* factory class. More...
class  property_c_setter
 Provides write access to arbitrary object data of the given type using a given multi-parameter setter method. More...
class  property_c_getter
 Provides read access to arbitrary object data of the given type using a given multi-parameter getter method. More...
struct  property_c_accessor_binder
 property_c_* factory class. More...
class  property_r_getter
 Provides read access to arbitrary object data of the given type using a given return-value getter method. More...
struct  property_r_accessor_binder
 property_r_* factory class. More...
class  property_collection
 Container class that may be used to store information on class / object properties. More...
struct  generic_property_type
 Generic property type implementation. More...

Functions

template<class Class , class Value >
LEAN_INLINE bool set_property (Class &object, property_setter< Class > *setter, const Value *values, size_t count)
 Passes the given values to the given object using the given setter.
template<class Class , class Value >
LEAN_INLINE bool set_property (Class &object, cloneable_obj< property_setter< Class >, false > &setter, const Value *values, size_t count)
 Passes the given values to the given object using the given setter.
template<class Class , class Value >
LEAN_INLINE bool set_property (Class &object, const cloneable_obj< property_setter< Class >, true > &setter, const Value *values, size_t count)
 Passes the given values to the given object using the given setter.
template<class Class , class Value >
LEAN_INLINE bool get_property (const Class &object, const property_getter< Class > *getter, Value *values, size_t count)
 Fetches the given number of values from the given object.
template<class Class , class Value , bool PointerSem>
LEAN_INLINE bool get_property (const Class &object, const cloneable_obj< property_getter< Class >, PointerSem > &getter, Value *values, size_t count)
 Fetches the given number of values from the given object.
template<class String , class Collection , class ID >
size_t find_property (const Collection &collection, const String &name, ID invalidID=invalid_property_id)
 Finds a property by name, returning its ID on success, invalid_property_id on failure.
template<class Class , class Value >
LEAN_INLINE property_constant
< Class, Value > 
make_property_constant (const Value *constantValues, size_t count)
 Constructs a property getter that provides access to the given number of the given values.
template<class Class , class UnionValue , class Count , class Return >
LEAN_INLINE
property_n_accessor_binder
< Class, UnionValue, Count,
Return > 
deduce_accessor_binder (Return(Class::*)(const UnionValue *, Count))
 Deduces the property_n_* factory class for the given setter.
template<class Class , class UnionValue , class Count , class Return >
LEAN_INLINE
property_n_accessor_binder
< Class, UnionValue, Count,
Return > 
deduce_accessor_binder (Return(Class::*)(UnionValue *, Count) const)
 Deduces the property_n_* factory class for the given getter.
template<class Class , class UnionValueArg , class Return >
LEAN_INLINE
property_c_accessor_binder
< Class, UnionValueArg,
1, Return > 
deduce_accessor_binder (Return(Class::*)(UnionValueArg))
 Deduces the property_c_* factory class for the given setter.
template<class Class , class UnionValueArg , class Return >
LEAN_INLINE
property_c_accessor_binder
< Class, UnionValueArg,
2, Return > 
deduce_accessor_binder (Return(Class::*)(UnionValueArg, UnionValueArg))
 Deduces the property_c_* factory class for the given setter.
template<class Class , class UnionValueArg , class Return >
LEAN_INLINE
property_c_accessor_binder
< Class, UnionValueArg,
3, Return > 
deduce_accessor_binder (Return(Class::*)(UnionValueArg, UnionValueArg, UnionValueArg))
 Deduces the property_c_* factory class for the given setter.
template<class Class , class UnionValueArg , class Return >
LEAN_INLINE
property_c_accessor_binder
< Class, UnionValueArg,
4, Return > 
deduce_accessor_binder (Return(Class::*)(UnionValueArg, UnionValueArg, UnionValueArg, UnionValueArg))
 Deduces the property_c_* factory class for the given setter.
template<class Class , class UnionValueReturn >
LEAN_INLINE
property_r_accessor_binder
< Class, UnionValueReturn > 
deduce_accessor_binder (UnionValueReturn(Class::*Getter)() const)
 Deduces the property_r_* factory class for the given getter.
template<class Type >
LEAN_INLINE const property_typeget_property_type ()
 Gets the property type info for the given type.

Detailed Description

Defines classes that allow for the specification of enhanced type information, e.g. making named setter and getter methods enumerable at run-time, to be used in a generic way while at the same time retaining type safety.

See also:
Property macros

Function Documentation

template<class Class , class UnionValueArg , class Return >
LEAN_INLINE property_c_accessor_binder< Class, UnionValueArg, 1, Return > lean::properties::deduce_accessor_binder ( Return(Class::*)(UnionValueArg)  )

Deduces the property_c_* factory class for the given setter.

Deduces the property_c_* factory class for the given getter.

template<class Class , class UnionValueArg , class Return >
LEAN_INLINE property_c_accessor_binder< Class, UnionValueArg, 2, Return > lean::properties::deduce_accessor_binder ( Return(Class::*)(UnionValueArg, UnionValueArg)  )

Deduces the property_c_* factory class for the given setter.

Deduces the property_c_* factory class for the given getter.

template<class Class , class UnionValueArg , class Return >
LEAN_INLINE property_c_accessor_binder< Class, UnionValueArg, 3, Return > lean::properties::deduce_accessor_binder ( Return(Class::*)(UnionValueArg, UnionValueArg, UnionValueArg)  )

Deduces the property_c_* factory class for the given setter.

Deduces the property_c_* factory class for the given getter.

template<class Class , class UnionValueArg , class Return >
LEAN_INLINE property_c_accessor_binder< Class, UnionValueArg, 4, Return > lean::properties::deduce_accessor_binder ( Return(Class::*)(UnionValueArg, UnionValueArg, UnionValueArg, UnionValueArg)  )

Deduces the property_c_* factory class for the given setter.

Deduces the property_c_* factory class for the given getter.