VISH  0.2
Classes | Typedefs | Functions | Variables
MemCore Namespace Reference

Memory Management classes and routines. More...

Classes

Typedefs

Functions

Variables


Detailed Description

Memory Management classes and routines.

The MemCore library provides

"Weak" and "strong" pointers are a natural extension of the native C++ pointer concept. Their semantic is similar to native pointers, but they provide significant improvements:

In contrast to simple reference counting as e.g. implemented via handles in OpenInventor, MemCore allows cyclic references and pointers to non-dynamically allocated (e.g. static or automatic) objects. It does that by utilizing intermediate object referers.


Function Documentation

void MemCore::________________________________________________getTime ( double &  sec,
Timer &  timer 
) [inline]

Reads the current time of a Timer into a variable.

Timing functions tend to make the code hardly readable and also the debugging output. That's why this functions look so weird; to be visible, marking lines of time measures. Can be enabled by setting #define TIMEIT before including the header file Timer.hpp

void MemCore::________________________________________________printTime ( const char *  text,
const double  time 
) [inline]

Print a time value.

Just to have a similar looking function as getTime for printing

MEMCORE_API string MemCore::FileRead ( const string &  filename,
const char *  how = "rb" 
)

Read a file completely into memory as string.

Parameters:
filenameThe file name, for instance as retrieved by PathOpen();
double MemCore::getEnvFloat ( const char *  n,
const char *  description 
)

Get a floating point value from an environment variable.

See also:
getEnvInteger
int MemCore::getEnvInteger ( const char *  n,
const char *  description 
)

Get an integer from an environment variable.

If the environment variable SHOW_ENVIRONMENT_CONTROL_VARIABLES is set, then a descriptive information is displayed for each environment variable upon its first possible use, even if it is not set.

MEMCORE_API string MemCore::PathOpen ( const std::list< string > &  path,
const string &  filename 
)

Find a file out of a list of possible directories.

Returns:
The full filename.

Variable Documentation

A list of possible path prefixes that will be indicated with "%0" etc.

within a PathOpen() call.

%0 is supposed to relate to the program's start path.