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 | Protected Member Functions
SGStringList< T > Class Template Reference

Detailed Description

template<class T>
class shogun::SGStringList< T >

template class SGStringList

Definition at line 43 of file SGObject.h.

Inheritance diagram for SGStringList< T >:
[legend]

Public Member Functions

 SGStringList ()
 
 SGStringList (SGString< T > *s, index_t num_s, index_t max_length, bool ref_counting=true)
 
 SGStringList (index_t num_s, index_t max_length, bool ref_counting=true)
 
 SGStringList (const SGStringList &orig)
 
virtual ~SGStringList ()
 
SGStringList< T > get ()
 
void load (CFile *loader)
 
void save (CFile *saver)
 
int32_t ref_count ()
 

Public Attributes

index_t num_strings
 
index_t max_string_length
 
SGString< T > * strings
 

Protected Member Functions

virtual void copy_data (const SGReferencedData &orig)
 
virtual void init_data ()
 
void free_data ()
 
void copy_refcount (const SGReferencedData &orig)
 
int32_t ref ()
 
int32_t unref ()
 

Constructor & Destructor Documentation

default constructor

Definition at line 10 of file SGStringList.cpp.

SGStringList ( SGString< T > *  s,
index_t  num_s,
index_t  max_length,
bool  ref_counting = true 
)

constructor for setting params

Definition at line 16 of file SGStringList.cpp.

SGStringList ( index_t  num_s,
index_t  max_length,
bool  ref_counting = true 
)

constructor to create new string list in memory

Definition at line 24 of file SGStringList.cpp.

SGStringList ( const SGStringList< T > &  orig)

copy constructor

Definition at line 32 of file SGStringList.cpp.

~SGStringList ( )
virtual

destructor

Definition at line 39 of file SGStringList.cpp.

Member Function Documentation

void copy_data ( const SGReferencedData orig)
protectedvirtual

copy data

Implements SGReferencedData.

Definition at line 65 of file SGStringList.cpp.

void copy_refcount ( const SGReferencedData orig)
protectedinherited

copy refcount

Definition at line 55 of file SGReferencedData.cpp.

void free_data ( )
protectedvirtual

free data

Implements SGReferencedData.

Definition at line 81 of file SGStringList.cpp.

SGStringList<T> get ( )

get the string list (no copying is done here)

Returns
the refcount increased string list

Definition at line 51 of file SGStringList.h.

void init_data ( )
protectedvirtual

init data

Implements SGReferencedData.

Definition at line 73 of file SGStringList.cpp.

void load ( CFile loader)

load strings from file

Parameters
loaderFile object via which to load data

Definition at line 44 of file SGStringList.cpp.

int32_t ref ( )
protectedinherited

increase reference counter

Returns
reference count

Definition at line 64 of file SGReferencedData.cpp.

int32_t ref_count ( )
inherited

display reference counter

Returns
reference count

Definition at line 41 of file SGReferencedData.cpp.

void save ( CFile saver)

save strings to file

Parameters
saverFile object via which to save data

Definition at line 54 of file SGStringList.cpp.

int32_t unref ( )
protectedinherited

decrement reference counter and deallocate object if refcount is zero before or after decrementing it

Returns
reference count

Definition at line 84 of file SGReferencedData.cpp.

Member Data Documentation

index_t max_string_length

length of longest string

Definition at line 85 of file SGStringList.h.

index_t num_strings

number of strings

Definition at line 82 of file SGStringList.h.

SGString<T>* strings

this contains the array of features

Definition at line 88 of file SGStringList.h.


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

SHOGUN Machine Learning Toolbox - Documentation