SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
List of all members | Public Member Functions
BaseAnyPolicy Class Referenceabstract

Detailed Description

An interface for a policy to store a value. Value can be any data like primitive data-types, shogun objects, etc. Policy defines how to handle this data. It works with a provided memory region and is able to set value, clear it and return the type-name as string.

Definition at line 66 of file any.h.

Inheritance diagram for BaseAnyPolicy:
[legend]

Public Member Functions

virtual void set (void **storage, const void *v) const =0
 
virtual void clear (void **storage) const =0
 
virtual std::string type () const =0
 
virtual bool matches (const std::type_info &ti) const =0
 
virtual bool equals (void **storage, void **other_storage) const =0
 

Member Function Documentation

virtual void clear ( void **  storage) const
pure virtual

Clears storage.

Parameters
storagepointer to a pointer to storage

Implemented in PointerValueAnyPolicy< T >.

virtual bool equals ( void **  storage,
void **  other_storage 
) const
pure virtual

Compares two storages.

Parameters
storagepointer to a pointer to storage
other_storagepointer to a pointer to another storage
Returns
true if both storages have same value

Implemented in PointerValueAnyPolicy< T >.

virtual bool matches ( const std::type_info &  ti) const
pure virtual

Compares type.

Parameters
titype information
Returns
true if type matches

Implemented in PointerValueAnyPolicy< T >.

virtual void set ( void **  storage,
const void *  v 
) const
pure virtual

Puts provided value pointed by v (untyped to be generic) to storage.

Parameters
storagepointer to a pointer to storage
vpointer to value

Implemented in PointerValueAnyPolicy< T >.

virtual std::string type ( ) const
pure virtual

Returns type-name as string.

Returns
name of type class

Implemented in PointerValueAnyPolicy< T >.


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

SHOGUN Machine Learning Toolbox - Documentation