VMan  1.0
Library for voxel managment.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
vman Namespace Reference

Classes

class  Access
 
union  ChunkIdHelper
 
struct  ChunkFileHeader
 
struct  ChunkFileLayerInfo
 
class  Chunk
 
class  JobEntry
 
class  Volume
 

Typedefs

typedef uint64_t ChunkId
 
typedef tthread::lock_guard
< tthread::mutex > 
lock_guard
 

Enumerations

enum  JobType { INVALID_JOB, LOAD_JOB, SAVE_JOB }
 
enum  FileType { FILE_TYPE_INVALID, FILE_TYPE_UNKNOWN, FILE_TYPE_REGULAR, FILE_TYPE_DIRECTORY }
 
enum  Statistic {
  STATISTIC_CHUNK_GET_HITS = 0, STATISTIC_CHUNK_GET_MISSES, STATISTIC_CHUNK_LOAD_OPS, STATISTIC_CHUNK_SAVE_OPS,
  STATISTIC_CHUNK_UNLOAD_OPS, STATISTIC_READ_OPS, STATISTIC_WRITE_OPS, STATISTIC_MAX_LOADED_CHUNKS,
  STATISTIC_MAX_SCHEDULED_CHECKS, STATISTIC_MAX_ENQUEUED_JOBS, STATISTIC_COUNT
}
 

Functions

bool InsideSelection (const vmanSelection *selection, int x, int y, int z)
 
ChunkFileLayerInfoFindChunkLayerByName (std::vector< ChunkFileLayerInfo > &layerInfos, const char *name)
 
bool IsLittleEndian_ ()
 
FileType GetFileType (const char *path)
 
bool MakeDirectory (const char *path)
 
bool MakePath (const char *path)
 
std::string Format (const char *format,...)
 
std::string CoordsToString (int x, int y, int z)
 
std::string SelectionToString (const vmanSelection *selection)
 
time_t AddSeconds (const time_t tv, int seconds)
 
uint16_t EndianSwap (uint16_t n)
 
int16_t EndianSwap (int16_t n)
 
uint32_t EndianSwap (uint32_t n)
 
int32_t EndianSwap (int32_t n)
 
uint16_t LittleEndian (uint16_t n)
 
int16_t LittleEndian (int16_t n)
 
uint32_t LittleEndian (uint32_t n)
 
int32_t LittleEndian (int32_t n)
 
uint16_t BigEndian (uint16_t n)
 
int16_t BigEndian (int16_t n)
 
uint32_t BigEndian (uint32_t n)
 
int32_t BigEndian (int32_t n)
 
int Index2D (int w, int h, int x, int y)
 
int Index3D (int w, int h, int d, int x, int y, int z)
 

Variables

const bool IsLittleEndian = IsLittleEndian_()
 
const char DirSep = '/'
 

Typedef Documentation

typedef uint64_t ChunkId

Definition at line 14 of file Chunk.h.

typedef tthread::lock_guard<tthread::mutex> lock_guard

Definition at line 108 of file Util.h.

Enumeration Type Documentation

enum JobType
Enumerator
INVALID_JOB 

Marks an job as invalid.

Invalid jobs are not processed and can be used to indicate an error.

LOAD_JOB 

A load job loads or reloads a chunk from the filesystem.

SAVE_JOB 

A save job saves a chunks to the filesystem.

Definition at line 10 of file JobEntry.h.

enum FileType
Enumerator
FILE_TYPE_INVALID 
FILE_TYPE_UNKNOWN 
FILE_TYPE_REGULAR 
FILE_TYPE_DIRECTORY 

Definition at line 69 of file Util.h.

enum Statistic
Enumerator
STATISTIC_CHUNK_GET_HITS 
STATISTIC_CHUNK_GET_MISSES 
STATISTIC_CHUNK_LOAD_OPS 
STATISTIC_CHUNK_SAVE_OPS 
STATISTIC_CHUNK_UNLOAD_OPS 
STATISTIC_READ_OPS 
STATISTIC_WRITE_OPS 
STATISTIC_MAX_LOADED_CHUNKS 
STATISTIC_MAX_SCHEDULED_CHECKS 
STATISTIC_MAX_ENQUEUED_JOBS 
STATISTIC_COUNT 

Definition at line 24 of file Volume.h.

Function Documentation

bool vman::InsideSelection ( const vmanSelection selection,
int  x,
int  y,
int  z 
)

Definition at line 118 of file Access.cpp.

ChunkFileLayerInfo* vman::FindChunkLayerByName ( std::vector< ChunkFileLayerInfo > &  layerInfos,
const char *  name 
)

Definition at line 175 of file Chunk.cpp.

+ Here is the caller graph for this function:

bool vman::IsLittleEndian_ ( )

Definition at line 19 of file Util.cpp.

FileType GetFileType ( const char *  path)

Definition at line 54 of file Util.cpp.

+ Here is the caller graph for this function:

bool MakeDirectory ( const char *  path)

Definition at line 67 of file Util.cpp.

+ Here is the caller graph for this function:

bool MakePath ( const char *  path)

Creates directory entries for all segments followed by an directory separator.

So that a file at the given path could be created.

Definition at line 73 of file Util.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string Format ( const char *  format,
  ... 
)

Definition at line 114 of file Util.cpp.

+ Here is the caller graph for this function:

std::string CoordsToString ( int  x,
int  y,
int  z 
)

Definition at line 130 of file Util.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string SelectionToString ( const vmanSelection selection)

Definition at line 137 of file Util.cpp.

+ Here is the call graph for this function:

time_t AddSeconds ( const time_t  tv,
int  seconds 
)

Definition at line 159 of file Util.cpp.

uint16_t vman::EndianSwap ( uint16_t  n)
inline

Definition at line 42 of file Util.h.

+ Here is the caller graph for this function:

int16_t vman::EndianSwap ( int16_t  n)
inline

Definition at line 46 of file Util.h.

+ Here is the call graph for this function:

uint32_t vman::EndianSwap ( uint32_t  n)
inline

Definition at line 48 of file Util.h.

int32_t vman::EndianSwap ( int32_t  n)
inline

Definition at line 52 of file Util.h.

+ Here is the call graph for this function:

uint16_t vman::LittleEndian ( uint16_t  n)
inline

Definition at line 54 of file Util.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int16_t vman::LittleEndian ( int16_t  n)
inline

Definition at line 55 of file Util.h.

+ Here is the call graph for this function:

uint32_t vman::LittleEndian ( uint32_t  n)
inline

Definition at line 56 of file Util.h.

+ Here is the call graph for this function:

int32_t vman::LittleEndian ( int32_t  n)
inline

Definition at line 57 of file Util.h.

+ Here is the call graph for this function:

uint16_t vman::BigEndian ( uint16_t  n)
inline

Definition at line 59 of file Util.h.

+ Here is the call graph for this function:

int16_t vman::BigEndian ( int16_t  n)
inline

Definition at line 60 of file Util.h.

+ Here is the call graph for this function:

uint32_t vman::BigEndian ( uint32_t  n)
inline

Definition at line 61 of file Util.h.

+ Here is the call graph for this function:

int32_t vman::BigEndian ( int32_t  n)
inline

Definition at line 62 of file Util.h.

+ Here is the call graph for this function:

int vman::Index2D ( int  w,
int  h,
int  x,
int  y 
)
inline

Definition at line 89 of file Util.h.

int vman::Index3D ( int  w,
int  h,
int  d,
int  x,
int  y,
int  z 
)
inline

Definition at line 97 of file Util.h.

+ Here is the caller graph for this function:

Variable Documentation

const bool IsLittleEndian = IsLittleEndian_()

Definition at line 24 of file Util.cpp.

const char DirSep = '/'

Definition at line 31 of file Util.cpp.