公有成员 | 保护属性

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 (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 ( char *  fname,
FILE *  f 
)

constructor rw is either r for read and w for write

参数:
fname filename
f file descriptor

在文件SimpleFile.h36行定义。

virtual ~CSimpleFile (  )  [virtual]

在文件SimpleFile.h44行定义。


成员函数文档

void free_line_buffer (  ) 

free the line buffer

在文件SimpleFile.h174行定义。

void get_buffered_line ( char *  line,
uint64_t  len 
)

read a line (buffered; to be implemented)

参数:
line linebuffer to write to
len maximum length

在文件SimpleFile.h150行定义。

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

实现了CSGObject

在文件SimpleFile.h200行定义。

bool is_ok (  ) 

check if status is ok

返回:
if status is ok

在文件SimpleFile.h197行定义。

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

load

参数:
target load target
num number of read elements
返回:
loaded target or NULL if unsuccessful

在文件SimpleFile.h56行定义。

bool save ( T *  target,
int64_t  num 
)

save

参数:
target target to save to
num number of elements to write
返回:
if saving was successful

在文件SimpleFile.h125行定义。

void set_line_buffer_size ( int32_t  bufsize  ) 

set the size of the line buffer

参数:
bufsize size of the line buffer

在文件SimpleFile.h184行定义。


成员数据文档

FILE* file [protected]

file descriptor

在文件SimpleFile.h204行定义。

char* filename [protected]

filename

在文件SimpleFile.h210行定义。

char* line_buffer [protected]

line buffer

在文件SimpleFile.h215行定义。

int32_t line_buffer_size [protected]

size of line buffer

在文件SimpleFile.h213行定义。

bool status [protected]

status of file operations

在文件SimpleFile.h206行定义。

char task [protected]

task

在文件SimpleFile.h208行定义。


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

SHOGUN Machine Learning Toolbox - Documentation