SHOGUN v0.9.0
公有成员 | 保护属性
CSimpleFile< T >模板类参考

详细描述

template<class T>
class shogun::CSimpleFile< T >

Template class SimpleFile to read and write from files.

Currently only simple reading and writing of blocks is supported.

在文件SimpleFile.h27行定义。

继承图,类CSimpleFile< T >
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CSimpleFile (void)
 CSimpleFile (char *fname, FILE *f)
virtual ~CSimpleFile ()
T * load (T *target, int64_t &num=0)
bool save (T *target, int64_t num)
void get_buffered_line (char *line, uint64_t len)
void free_line_buffer ()
void set_line_buffer_size (int32_t bufsize)
bool is_ok ()
virtual const char * get_name () const

保护属性

FILE * file
bool status
char task
char * filename
int32_t line_buffer_size
char * line_buffer

构造及析构函数文档

CSimpleFile ( void  )

default constructor

在文件SimpleFile.h31行定义。

CSimpleFile ( char *  fname,
FILE *  f 
)

constructor rw is either r for read and w for write

参数:
fnamefilename
ffile descriptor

在文件SimpleFile.h46行定义。

virtual ~CSimpleFile ( ) [virtual]

在文件SimpleFile.h54行定义。


成员函数文档

void free_line_buffer ( )

free the line buffer

在文件SimpleFile.h184行定义。

void get_buffered_line ( char *  line,
uint64_t  len 
)

read a line (buffered; to be implemented)

参数:
linelinebuffer to write to
lenmaximum length

在文件SimpleFile.h160行定义。

virtual const char* get_name ( void  ) const [virtual]
返回:
object name

实现了CSGObject

在文件SimpleFile.h210行定义。

bool is_ok ( )

check if status is ok

返回:
if status is ok

在文件SimpleFile.h207行定义。

T* load ( T *  target,
int64_t &  num = 0 
)

load

参数:
targetload target
numnumber of read elements
返回:
loaded target or NULL if unsuccessful

在文件SimpleFile.h66行定义。

bool save ( T *  target,
int64_t  num 
)

save

参数:
targettarget to save to
numnumber of elements to write
返回:
if saving was successful

在文件SimpleFile.h135行定义。

void set_line_buffer_size ( int32_t  bufsize)

set the size of the line buffer

参数:
bufsizesize of the line buffer

在文件SimpleFile.h194行定义。


成员数据文档

FILE* file [protected]

file descriptor

在文件SimpleFile.h214行定义。

char* filename [protected]

filename

在文件SimpleFile.h220行定义。

char* line_buffer [protected]

line buffer

在文件SimpleFile.h225行定义。

int32_t line_buffer_size [protected]

size of line buffer

在文件SimpleFile.h223行定义。

bool status [protected]

status of file operations

在文件SimpleFile.h216行定义。

char task [protected]

task

在文件SimpleFile.h218行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation