/usr/include/shogun/lib/SGString.h is in libshogun-dev 3.2.0-7.3build4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Written (W) 2012 Fernando José Iglesias García
* Written (W) 2010,2012 Soeren Sonnenburg
* Written (W) 2012 Jacob Walker
* Copyright (C) 2010 Berlin Institute of Technology
* Copyright (C) 2012 Soeren Sonnenburg
*/
#ifndef __SGSTRING_H__
#define __SGSTRING_H__
#include <shogun/lib/config.h>
#include <shogun/lib/DataType.h>
namespace shogun
{
template<class T> class SGVector;
class CFile;
/** @brief shogun string */
template<class T> class SGString
{
public:
/** default constructor */
SGString();
/** constructor for setting params */
SGString(T* s, index_t l, bool free_s=false);
/** constructor for setting params from a SGVector*/
SGString(SGVector<T> v);
/** constructor to create new string in memory */
SGString(index_t len, bool free_s=false);
/** copy constructor */
SGString(const SGString &orig);
/** equality operator */
bool operator==(const SGString & other) const;
/** free string */
void free_string();
/** destroy string */
void destroy_string();
/**
* get the string (no copying is done here)
*
* @return the refcount increased string
*/
inline SGString<T> get()
{
return *this;
}
/** load string from file
*
* @param loader File object via which to load data
*/
void load(CFile* loader);
/** save string to file
*
* @param saver File object via which to save data
*/
void save(CFile* saver);
public:
/** string */
T* string;
/** length of string */
index_t slen;
/** whether string needs to be freed */
bool do_free;
};
}
#endif // __SGSTRING_H__
|