|  | OpenMS
    2.6.0
    | 
 
 
  
  
 
Go to the documentation of this file.
   92         if (globalExceptionHandler_ == 
nullptr)
 
   96         return *globalExceptionHandler_;
 
  105       static void setName(
const std::string & name)
 
  110       static void setMessage(
const std::string & message)
 
  115       static void setLine(
int line)
 
  120       static void setFile(
const std::string & file)
 
  125       static void setFunction(
const std::string & 
function)
 
  130       static void set(
const std::string & file, 
int line, 
const std::string & 
function,
 
  131                       const std::string & name, 
const std::string & message)
 
  137       static void terminate()
 
  141       static 
void newHandler();
 
  153       static std::
string & file_()
 
  155         static std::string * file_ = 
nullptr;
 
  156         if (file_ == 
nullptr)
 
  158           file_  = 
new std::string;
 
  167         static int * line_ = 
nullptr;
 
  168         if (line_ == 
nullptr)
 
  179         static std::string * function_ = 
nullptr;
 
  180         if (function_ == 
nullptr)
 
  182           function_  = 
new std::string;
 
  183           *function_ = 
"unknown";
 
  191         static std::string * name_ = 
nullptr;
 
  192         if (name_ == 
nullptr)
 
  194           name_  = 
new std::string;
 
  195           *name_ = 
"unknown exception";
 
  203         static std::string * what_ = 
nullptr;
 
  204         if (what_ == 
nullptr)
 
  206           what_  = 
new std::string;
 
  
static int & line_()
wrapper for static member line_
Definition: GlobalExceptionHandler.h:165
OpenMS global exception handler.
Definition: GlobalExceptionHandler.h:53
GlobalExceptionHandler(const GlobalExceptionHandler &)
private version of c'tor to avoid initialization
Definition: GlobalExceptionHandler.h:82
Base class for TOPP applications.
Definition: TOPPBase.h:144
Param copy(const String &prefix, bool remove_prefix=false) const
Returns a new Param object containing all entries that start with prefix.
~GlobalExceptionHandler()
Definition: GlobalExceptionHandler.h:84
Parameter entry used to store the actual information inside of a Param entry.
Definition: Param.h:78
std::vector< FileMapping > pre_moves
Definition: ToolDescription.h:69
string value
Definition: DataValue.h:67
Maps input/output files to filenames for the external program.
Definition: ToolDescription.h:53
Invalid value exception.
Definition: Exception.h:335
String & substitute(char from, char to)
Replaces all occurrences of the character from by the character to.
void setValue(const String &key, const DataValue &value, const String &description="", const StringList &tags=StringList())
Sets a value.
QString toQString() const
Conversion to QString.
string list
Definition: DataValue.h:70
String text_fail
Definition: ToolDescription.h:109
static std::string & name_()
wrapper for static member name_
Definition: GlobalExceptionHandler.h:189
A more convenient string class.
Definition: String.h:59
String & trim()
removes whitespaces (space, tab, line feed, carriage return) at the beginning and the end of the stri...
ReverseComparator< Cmp > reverseComparator(Cmp const &cmp)
Make-function to create a ReverseComparator from another comparator without the need to specify the t...
Definition: ComparatorUtils.h:260
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
std::set< String > tags
Tags list, used e.g. for advanced parameter tag.
Definition: Param.h:108
static GlobalExceptionHandler & getInstance()
The accessor for the singleton. It also serves as a replacement for the constructor.
Definition: GlobalExceptionHandler.h:88
const DataValue & getValue(const String &key) const
Returns a value of a parameter.
static std::string & what_()
wrapper for static member what_
Definition: GlobalExceptionHandler.h:201
String path
filename to external tool
Definition: ToolDescription.h:113
static bool remove(const String &file)
Removes a file (if it exists).
#define OPENMS_LOG_WARN
Macro if a warning, a piece of information which should be read by the user, should be logged.
Definition: LogStream.h:460
bool hasSubstring(const String &string) const
true if String contains the string, false otherwise
DataValue value
Value associated with the entry.
Definition: Param.h:106
static String concatenate(const std::vector< T > &container, const String &glue="")
Concatenates all elements of the container and puts the glue string between elements.
Definition: ListUtils.h:193
String location
a regex/macro mix; to be expanded by tool;
Definition: ToolDescription.h:55
Forward const iterator for the Param class.
Definition: Param.h:197
static bool exists(const String &file)
Method used to test if a file exists.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
bool exists(const String &key) const
Tests if a parameter is set (expecting its fully qualified name, e.g., TextExporter:1:proteins_only)
String text_finish
Definition: ToolDescription.h:110
static std::string & function_()
wrapper for static member function_
Definition: GlobalExceptionHandler.h:177
String target
TOPP parameter that determines the desired name.
Definition: ToolDescription.h:56
MappingParam tr_table
Definition: ToolDescription.h:115
Size size() const
Returns the number of entries (leafs).
QString toQString() const
Conversion to Qt QString.
static UInt64 getUniqueId()
Returns a new unique id.
DataType valueType() const
returns the type of value stored
Definition: DataValue.h:365
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition: Types.h:134
ParamIterator end() const
End iterator for the internal tree.
#define OPENMS_LOG_ERROR
Macro to be used if non-fatal error are reported (processing continues)
Definition: LogStream.h:455
ParamIterator begin() const
Begin iterator for the internal tree.
std::map< Int, String > mapping
Definition: ToolDescription.h:68
String commandline
Definition: ToolDescription.h:112
Management and storage of parameters / INI files.
Definition: Param.h:73
static String getTempDirectory()
The current OpenMS temporary data path (for temporary files)
const ParamEntry & getEntry(const String &key) const
Returns the whole parameter entry.
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
String text_startup
Definition: ToolDescription.h:108
String working_directory
folder where the command will be executed from
Definition: ToolDescription.h:114
std::vector< FileMapping > post_moves
Definition: ToolDescription.h:70