SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 #include <shogun/lib/common.h>
17 #include <shogun/lib/DataType.h>
19 #include <shogun/lib/SGString.h>
20 
21 namespace shogun
22 {
23 
25 template <class T> class SGStringList : public SGReferencedData
26 {
27 public:
29  SGStringList();
30 
32  SGStringList(SGString<T>* s, index_t num_s, index_t max_length,
33  bool ref_counting=true);
34 
36  SGStringList(index_t num_s, index_t max_length, bool ref_counting=true);
37 
39  SGStringList(const SGStringList &orig);
40 
42  virtual ~SGStringList();
43 
49  inline SGStringList<T> get()
50  {
51  return *this;
52  }
53 
58  void load(CFile* loader);
59 
64  void save(CFile* saver);
65 
66 
67 protected:
68 
70  virtual void copy_data(const SGReferencedData &orig);
71 
73  virtual void init_data();
74 
76  void free_data();
77 
78 public:
81 
84 
87 };
88 }
89 #endif // __SGSTRINGLIST_H__

SHOGUN Machine Learning Toolbox - Documentation