utils.h File Reference

#include <fstream>
#include <string>

Go to the source code of this file.

Functions

const void * file_get_contents (const char *filename, size_t *size)
bool file_unmap_contents (void *base, size_t size)
bool getNonEmptyLine (std::fstream &file, std::string &line, bool onlyMySection=false, bool *mySection=NULL)


Function Documentation

const void* file_get_contents const char *  filename,
size_t *  size
 

loads a file to memory. size is filled with the file's size or -1 if the return value is NULL

Definition at line 33 of file utils.cc.

References fd.

bool file_unmap_contents void *  base,
size_t  size
 

frees the memory allocated with file_get_contents

Definition at line 57 of file utils.cc.

bool getNonEmptyLine std::fstream &  file,
std::string &  line,
bool  onlyMySection = false,
bool *  mySection = NULL
 

Referenced by parse_connect_cfg(), and parse_object_cfg().


Generated on Sun Dec 2 23:04:32 2007 for openSDK by  doxygen 1.3.9.1