SHOGUN
4.2.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
src
shogun
lib
SGString.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
* Written (W) 2012 Jacob Walker
10
* Copyright (C) 2010 Berlin Institute of Technology
11
* Copyright (C) 2012 Soeren Sonnenburg
12
*/
13
#ifndef __SGSTRING_H__
14
#define __SGSTRING_H__
15
16
#include <
shogun/lib/config.h
>
17
#include <
shogun/lib/common.h
>
18
19
namespace
shogun
20
{
21
22
template
<
class
T>
class
SGVector;
23
class
CFile;
24
26
template
<
class
T>
class
SGString
27
{
28
public
:
30
SGString
();
31
33
SGString
(T* s,
index_t
l,
bool
free_s=
false
);
34
36
SGString
(SGVector<T> v);
37
39
SGString
(
index_t
len,
bool
free_s=
false
);
40
42
SGString
(
const
SGString
&orig);
43
45
bool
operator==
(
const
SGString
& other)
const
;
46
48
void
free_string
();
49
51
void
destroy_string
();
52
58
inline
SGString<T>
get
()
59
{
60
return
*
this
;
61
}
62
67
void
load
(
CFile
* loader);
68
73
void
save
(
CFile
* saver);
74
75
public
:
77
T*
string
;
79
index_t
slen
;
81
bool
do_free
;
82
};
83
}
84
#endif // __SGSTRING_H__
shogun::SGString::destroy_string
void destroy_string()
Definition:
SGString.cpp:59
index_t
int32_t index_t
Definition:
common.h:62
config.h
shogun::SGString::free_string
void free_string()
Definition:
SGString.cpp:48
shogun::SGString::do_free
bool do_free
Definition:
SGString.h:81
shogun::SGString
shogun string
Definition:
base/Parameter.h:25
shogun::SGString::save
void save(CFile *saver)
Definition:
SGString.cpp:76
shogun::SGString::load
void load(CFile *loader)
Definition:
SGString.cpp:65
shogun::CFile
A File access base class.
Definition:
File.h:34
shogun
all of classes and functions are contained in the shogun namespace
Definition:
class_list.h:18
shogun::SGString::operator==
bool operator==(const SGString &other) const
Definition:
SGString.cpp:33
shogun::SGString::slen
index_t slen
Definition:
SGString.h:79
common.h
shogun::SGString::SGString
SGString()
Definition:
SGString.cpp:11
shogun::SGString::string
T * string
Definition:
SGString.h:77
SHOGUN
Machine Learning Toolbox - Documentation