SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SGStringList.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2012 Fernando José Iglesias García
8  * Written (W) 2010,2012 Soeren Sonnenburg
9  * Copyright (C) 2010 Berlin Institute of Technology
10  * Copyright (C) 2012 Soeren Sonnenburg
11  */
12 #ifndef __SGSTRINGLIST_H__
13 #define __SGSTRINGLIST_H__
14 
15 #include <shogun/lib/config.h>
16 
17 #include <shogun/lib/common.h>
19 #include <shogun/lib/SGString.h>
20 
21 namespace shogun
22 {
23 class CFile;
24 template <class T> class SGString;
25 
27 template <class T> class SGStringList : public SGReferencedData
28 {
29 public:
31  SGStringList();
32 
34  SGStringList(SGString<T>* s, index_t num_s, index_t max_length,
35  bool ref_counting=true);
36 
38  SGStringList(index_t num_s, index_t max_length, bool ref_counting=true);
39 
41  SGStringList(const SGStringList &orig);
42 
44  virtual ~SGStringList();
45 
51  inline SGStringList<T> get()
52  {
53  return *this;
54  }
55 
60  void load(CFile* loader);
61 
66  void save(CFile* saver);
67 
68 
69 protected:
70 
72  virtual void copy_data(const SGReferencedData &orig);
73 
75  virtual void init_data();
76 
78  void free_data();
79 
80 public:
83 
86 
89 };
90 }
91 #endif // __SGSTRINGLIST_H__
template class SGStringList
Definition: SGObject.h:43
int32_t index_t
Definition: common.h:62
void load(CFile *loader)
shogun string
virtual void init_data()
shogun reference count managed data
A File access base class.
Definition: File.h:34
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
SGString< T > * strings
Definition: SGStringList.h:88
void save(CFile *saver)
virtual void copy_data(const SGReferencedData &orig)

SHOGUN Machine Learning Toolbox - Documentation