GLUtils Class Reference

#include <GLUtils.h>

List of all members.

Public Member Functions

 GLUtils ()
virtual ~GLUtils ()

Static Public Member Functions

static void assertEvaluated (const GLBaseOrganism *organism, const string &message="")
template<class sourceOrg , class targetOrg >
static void makeHardCopy (const vector< sourceOrg * > &source, vector< targetOrg * > &target)
static void printVectorOfOrganisms (ostream &out, const TGLVectorOfOrganisms &organisms)
static void printVectorOfOrganisms (ostream &out, const TGLVectorOfOrganismsConst &organisms)


Detailed Description

Class for simple utils, mostly static.

Definition at line 11 of file GLUtils.h.


Constructor & Destructor Documentation

GLUtils::GLUtils (  )  [inline]

Simple constructor.

Definition at line 17 of file GLUtils.h.

virtual GLUtils::~GLUtils (  )  [inline, virtual]

Simple destructor.

Definition at line 22 of file GLUtils.h.


Member Function Documentation

void GLUtils::assertEvaluated ( const GLBaseOrganism organism,
const string &  message = "" 
) [static]

organisms is not evaluated throws GLLogicError exception.

Parameters:
organism pointer to be asserted.
message useful information, e.g. name of the pointer and/or calling function.

Definition at line 17 of file GLUtils.cpp.

template<class sourceOrg , class targetOrg >
static void GLUtils::makeHardCopy ( const vector< sourceOrg * > &  source,
vector< targetOrg * > &  target 
) [inline, static]

Makes the hard copy of organisms in the vector (templated to allow for processing constant and not-constant pointers to the organisms).

Parameters:
source vector of organisms to copy from.
target vector of organisms to copy to. All the previous content will be deleted and memory for organisms previously stored there will be freed.

Definition at line 42 of file GLUtils.h.

void GLUtils::printVectorOfOrganisms ( ostream &  out,
const TGLVectorOfOrganismsConst &  organisms 
) [static]

Prints the vector of organisms pointers with their fitness value, if present.

Parameters:
out output stream.
organisms 

Definition at line 64 of file GLUtils.cpp.

void GLUtils::printVectorOfOrganisms ( ostream &  out,
const TGLVectorOfOrganisms &  organisms 
) [static]

Prints the vector of organisms pointers with their fitness value, if present.

Parameters:
out output stream.
organisms 

Definition at line 38 of file GLUtils.cpp.


The documentation for this class was generated from the following files:

Generated on Sat Jun 13 13:58:13 2009 for GenLib by  doxygen 1.5.9