PLearn 0.1
|
#include <deque>
#include <map>
#include <plearn/base/pl_hash_fun.h>
#include <set>
#include <list>
#include <vector>
#include <string>
#include <time.h>
#include <utility>
#include "plerror.h"
Go to the source code of this file.
Namespaces | |
namespace | PLearn |
< for swap | |
Defines | |
#define | NODEEPCOPY(TYPE) |
< For definition of 'clock_t'. | |
Typedefs | |
typedef map< const void *, void * > | PLearn::CopiesMap |
Global typedef to make the map of copied objects (needed by the deep copy mechanism in Object) more palatable. | |
typedef map< string, float > | PLearn::map_string_float |
Some typedefs to use the NODEEPCOPY macro with. | |
typedef map< string, double > | PLearn::map_string_double |
typedef map< double, string > | PLearn::map_double_string |
typedef map< float, string > | PLearn::map_float_string |
typedef map< string, string > | PLearn::map_string_string |
typedef map< float, float > | PLearn::map_float_float |
typedef map< double, double > | PLearn::map_double_double |
typedef map< string, int > | PLearn::map_string_int |
typedef map< int, string > | PLearn::map_int_string |
Functions | |
PLearn::NODEEPCOPY (FILE *) template< class T | |
Support for generic deep copying. | |
class U inline void | PLearn::deepCopyField (pair< T, U > &p, CopiesMap &copies) |
template<class T , class Alloc > | |
void | PLearn::deepCopyField (deque< T, Alloc > &c, CopiesMap &copies) |
Standard containers handle deepcopying by distributing it to each element. | |
template<class T , class U , class Compare , class Alloc > | |
void | PLearn::deepCopyField (map< T, U, Compare, Alloc > &c, CopiesMap &copies) |
template<class T , class U , class Compare , class Alloc > | |
void | PLearn::deepCopyField (hash_map< T, U, Compare, Alloc > &c, CopiesMap &copies) |
template<class T , class U , class Compare , class Alloc > | |
void | PLearn::deepCopyField (multimap< T, U, Compare, Alloc > &c, CopiesMap &copies) |
template<class T , class Compare , class Alloc > | |
void | PLearn::deepCopyField (set< T, Compare, Alloc > &c, CopiesMap &copies) |
template<class T , class Compare , class Alloc > | |
void | PLearn::deepCopyField (multiset< T, Compare, Alloc > &c, CopiesMap &copies) |
template<class T , class Alloc > | |
void | PLearn::deepCopyField (list< T, Alloc > &c, CopiesMap &copies) |
template<class T , class Alloc > | |
void | PLearn::deepCopyField (vector< T, Alloc > &c, CopiesMap &copies) |
template<class T > | |
void | PLearn::deepCopyField (T &, CopiesMap &) |
Any type not handled below: do nothing. | |
template<class T > | |
void | PLearn::deepCopyField (T *&field, CopiesMap &copies) |
template<class T > | |
T * | PLearn::deepCopy (const T *source, CopiesMap &copies) |
A simple template function that calls the method. | |
template<class T > | |
T * | PLearn::deepCopy (const T *source) |
This function simply calls the previous one with an initially empty map. |
#define NODEEPCOPY | ( | TYPE | ) |
inline void deepCopyField(TYPE&, CopiesMap&) {} \ inline void deepCopyField(Array<TYPE>&, CopiesMap&) {}
< For definition of 'clock_t'.
< For pair. < For PLWARNING. Macro to define deep copy for types that actually do not require any deep copy (such as int, real, etc.). Since the copy constructor of an array does copy the content of its storage, deep copying an array of such types is not necessary either.
Definition at line 55 of file CopiesMap.h.