|
MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <ctime>#include <map>#include <sstream>#include "../randnum/RNG.h"#include "../utility/print_function.hpp"
Include dependency graph for global.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| moose | |
Macros | |
| #define | BAD_CHARACTER_IN_PATH -6 |
| #define | EMPTY_PATH -2 |
| #define | MISSING_BRACKET_AT_END -1 |
| #define | SPACES_AT_THE_BEGINING -3 |
| #define | SPACES_AT_THE_END -4 |
| #define | SPACES_IN_BETWEEN -5 |
| #define | TEST_BEGIN cout << endl << "Test(" << totalTests << "): " << SIMPLE_CURRENT_FUNCTION; |
| This macro prints the output of a test function onto console. It also keep track of index of the current test. The index of test is automatically computed by increamenting the counter. More... | |
| #define | TEST_END |
Functions | |
| int | moose::checkPath (const string &path) |
| Checks if given path is correct. If not, return false and error-code as well. More... | |
| string | moose::createMOOSEPath (const string &path) |
| Create a POSIX compatible path from a given string. Remove/replace bad characters. More... | |
| bool | moose::createParentDirs (const string &path) |
| Create directories recursively needed to open the given file p. More... | |
| string | moose::fixPath (string path) |
| Fix a path. For testing purpose. More... | |
| string | moose::getExtension (const string &path, bool without_dot=true) |
| Get the extension of a given filepath. More... | |
| int | moose::getGlobalSeed () |
| string | moose::joinPath (string pathA, string pathB) |
| Append pathB to pathA and return the result. More... | |
| string | moose::moosePathToUserPath (string path) |
| When user gives a path /a/b/c, moose creates a path /a[0]/b[0]/c[0]. This is helpful in cases where one needs to create more than 1 element. More... | |
| double | moose::mtrand (void) |
| Generate a random double between 0 and 1. More... | |
| void | moose::mtseed (unsigned int x) |
| Set the global seed or all rngs. More... | |
| string | moose::pathToName (const string &path) |
Return the name when path is given. Its behaviour is exactly the same as of basename command on unix system. More... | |
| void | moose::setGlobalSeed (int seed) |
| string | moose::toFilename (const string &path) |
| Replace all directory sepearator with _. This creates a filepath which can be created in current directory without any need to create parent directory. More... | |
| string | moose::toString (double x) |
| Convert a given value to string. More... | |
Variables | |
| stringstream | errorSS |
| Global stringstream for message printing. More... | |
| unsigned int | totalTests |
| Keep tracks of how many tests have been executed in moose. More... | |
| #define BAD_CHARACTER_IN_PATH -6 |
Definition at line 49 of file global.h.
Referenced by moose::checkPath().
| #define EMPTY_PATH -2 |
Definition at line 45 of file global.h.
Referenced by moose::checkPath().
| #define MISSING_BRACKET_AT_END -1 |
Definition at line 44 of file global.h.
Referenced by moose::checkPath(), and moose::fixPath().
| #define TEST_BEGIN cout << endl << "Test(" << totalTests << "): " << SIMPLE_CURRENT_FUNCTION; |
| #define TEST_END |
| stringstream errorSS |
Global stringstream for message printing.
Definition at line 32 of file global.cpp.
Referenced by HSolveUtils::gates().
| unsigned int totalTests |
Keep tracks of how many tests have been executed in moose.
Definition at line 30 of file global.cpp.