basecode/global.cpp File Reference

#include "global.h"
#include "../external/debug/simple_logger.hpp"
#include <numeric>
Include dependency graph for global.cpp:

Namespaces

namespace  moose

Functions

int checkPath (const string &path)
 Checks if given path is correct. If not, return false and error-code as well.
string joinPath (string pathA, string pathB)
 Append pathB to pathA and return the result.
string fixPath (string path)
 Fix a path. For testing purpose.
string dumpStats (int)
int moose::checkPath (const string &path)
 Checks if given path is correct. If not, return false and error-code as well.
string moose::joinPath (string pathA, string pathB)
 Append pathB to pathA and return the result.
string moose::fixPath (string path)
 Fix a path. For testing purpose.

Variables

unsigned int totalTests = 0
 Keep tracks of how many tests have been executed in moose.
stringstream errorSS
 Global stringstream for message printing.
clock_t simClock = clock()
SimpleLogger logger

Function Documentation

int checkPath ( const string &  path  ) 

Checks if given path is correct. If not, return false and error-code as well.

Parameters:
path Path name.
Returns:
0 if path is all-right. Negative number if path is not OK.
string dumpStats ( int   ) 
string fixPath ( string  path  ) 

Fix a path. For testing purpose.

Parameters:
path Path as string.
Returns:
A fixed path.

Referenced by HSolveUtils::gates().

string joinPath ( string  pathA,
string  pathB 
)

Append pathB to pathA and return the result.

If pathA does not have [indexs] at the end, append "[0]" to pathA and then add pathB to it. This version does not care if the result has '[0]' at its end.

Parameters:
pathA First path.
pathB Second path.
Returns:
A string representing moose-path.

Variable Documentation

stringstream errorSS

Global stringstream for message printing.

Referenced by HSolveUtils::gates().

SimpleLogger logger
clock_t simClock = clock()
unsigned int totalTests = 0

Keep tracks of how many tests have been executed in moose.


Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1