31 _externalStructureFiles(false),
38 _incidenceMatrices(false),
39 _externalFunctions(false),
43 _debugOptions[
"SD_DBG_VarChanges"] = 1 << 0;
44 _debugOptions[
"SD_DBG_InitValues"] = 1 << 1;
45 _debugOptions[
"SD_DBG_StepInfo"] = 1 << 2;
46 _debugOptions[
"SD_DBG_Weights"] = 1 << 3;
47 _debugOptions[
"SD_DBG_Memory"] = 1 << 4;
48 _debugOptions[
"SD_DBG_ExternalEvent"] = 1 << 5;
49 _debugOptions[
"SD_DBG_Synchronize"] = 1 << 6;
50 _debugOptions[
"SD_DBG_WaitFor"] = 1 << 7;
51 _debugOptions[
"SD_DBG_Dt"] = 1 << 8;
54 bool CompileFlags::store() {
return _store; }
56 void CompileFlags::setStore(
bool s) { _store = s; }
58 void CompileFlags::setIncidenceMatrices(
bool im) { _incidenceMatrices = im; }
60 bool CompileFlags::incidenceMatrices() {
return _incidenceMatrices; }
62 bool CompileFlags::output() {
return _output; }
64 void CompileFlags::setOutput(
bool s) { _output = s; }
66 bool CompileFlags::externalFunctions() {
return _externalFunctions; }
68 void CompileFlags::setExternalFunctions(
bool s) { _externalFunctions = s; }
70 int CompileFlags::debug() {
return _debug; }
72 void CompileFlags::setDebug(
int s) { _debug |= s; }
74 void CompileFlags::setOutputFile(
string outputFile) { _outputFile = outputFile; }
76 string CompileFlags::outputFileName() {
return Utils::instance().getFileName(_outputFile); }
78 string CompileFlags::outputFilePath() {
return Utils::instance().getFilePath(_outputFile); }
80 string CompileFlags::outputFile() {
return _outputFile; }
82 bool CompileFlags::hasOutputFile() {
return !_outputFile.empty(); }
84 void CompileFlags::setPath(
string p) { _path = p; }
86 string CompileFlags::path() {
return _path; }
88 list<string> CompileFlags::libraryPaths() {
return _libraryPaths; }
90 void CompileFlags::addLibraryPath(
string l) { _libraryPaths.push_back(l); }
92 void CompileFlags::addObject(
string o) { _objects.insert(pair<string, string>(o, o)); }
94 list<string> CompileFlags::objects()
97 for (map<string, string>::iterator it = _objects.begin(); it != _objects.end(); it++) {
98 ret.push_back(it->second);
103 bool CompileFlags::hasObjects() {
return !_objects.empty(); }
105 bool CompileFlags::externalStructureFile() {
return _externalStructureFiles; }
107 void CompileFlags::setExternalStructureFile(
bool s) { _externalStructureFiles = s; }
109 void CompileFlags::setDebug(
string s)
111 if (_debugOptions.find(s) != _debugOptions.end()) {
112 _debug |= _debugOptions[s];
113 if (!s.compare(
"SD_DBG_Weights")) {
114 _debug |= _debugOptions[
"SD_DBG_VarChanges"];
119 void CompileFlags::setTesting(
bool testing) { _testing = testing; }
121 bool CompileFlags::testing() {
return _testing; }