SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
List of all members | Public Member Functions | Public Attributes
SGString< T > Singleton Reference

Detailed Description

template<class T>
singleton shogun::SGString< T >

shogun string

Definition at line 25 of file base/Parameter.h.

Public Member Functions

 SGString ()
 
 SGString (T *s, index_t l, bool free_s=false)
 
 SGString (SGVector< T > v)
 
 SGString (index_t len, bool free_s=false)
 
 SGString (const SGString &orig)
 
bool operator== (const SGString &other) const
 
void free_string ()
 
void destroy_string ()
 
SGString< T > get ()
 
void load (CFile *loader)
 
void save (CFile *saver)
 

Public Attributes

T * string
 
index_t slen
 
bool do_free
 

Constructor & Destructor Documentation

SGString ( )

default constructor

Definition at line 11 of file SGString.cpp.

SGString ( T *  s,
index_t  l,
bool  free_s = false 
)

constructor for setting params

Definition at line 14 of file SGString.cpp.

SGString ( SGVector< T >  v)

constructor for setting params from a SGVector

Definition at line 18 of file SGString.cpp.

SGString ( index_t  len,
bool  free_s = false 
)

constructor to create new string in memory

Definition at line 22 of file SGString.cpp.

SGString ( const SGString< T > &  orig)

copy constructor

Definition at line 29 of file SGString.cpp.

Member Function Documentation

void destroy_string ( )

destroy string

Definition at line 59 of file SGString.cpp.

void free_string ( )

free string

Definition at line 48 of file SGString.cpp.

SGString<T> get ( )

get the string (no copying is done here)

Returns
the refcount increased string

Definition at line 58 of file SGString.h.

void load ( CFile loader)

load string from file

Parameters
loaderFile object via which to load data

Definition at line 65 of file SGString.cpp.

bool operator== ( const SGString< T > &  other) const

equality operator

Definition at line 33 of file SGString.cpp.

void save ( CFile saver)

save string to file

Parameters
saverFile object via which to save data

Definition at line 76 of file SGString.cpp.

Member Data Documentation

bool do_free

whether string needs to be freed

Definition at line 81 of file SGString.h.

index_t slen

length of string

Definition at line 79 of file SGString.h.

T* string

string

Definition at line 77 of file SGString.h.


The documentation for this singleton was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation