new global verbose flag

pull/1/head v0.0.16
Thorsten Liebig 2010-11-30 16:02:51 +01:00
parent 1cb6040524
commit 0bbb5cc3ee
2 changed files with 11 additions and 0 deletions

View File

@ -28,6 +28,7 @@ Global::Global()
{ {
m_showProbeDiscretization = false; m_showProbeDiscretization = false;
m_nativeFieldDumps = false; m_nativeFieldDumps = false;
m_VerboseLevel = 0;
} }
void Global::ShowArguments(ostream& ostr, string front) void Global::ShowArguments(ostream& ostr, string front)
@ -54,5 +55,11 @@ bool Global::parseCommandLineArgument( const char *argv )
m_nativeFieldDumps = true; m_nativeFieldDumps = true;
return true; return true;
} }
else if (strcmp(argv,"-v")==0)
{
cout << "openEMS - verbose level 1" << endl;
m_VerboseLevel = 1;
return true;
}
return false; return false;
} }

View File

@ -37,9 +37,13 @@ public:
void ShowArguments(std::ostream& ostr, std::string front=std::string()); void ShowArguments(std::ostream& ostr, std::string front=std::string());
void SetVerboseLevel(int level) {m_VerboseLevel=level;}
int GetVerboseLevel() const {return m_VerboseLevel;}
protected: protected:
bool m_showProbeDiscretization; bool m_showProbeDiscretization;
bool m_nativeFieldDumps; bool m_nativeFieldDumps;
int m_VerboseLevel;
}; };
extern Global g_settings; extern Global g_settings;