BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
Core.h
Go to the documentation of this file.
1/*
2 * Core.h
3 * ers
4 *
5 * Created by Matthias Wiesmann on 13.12.04.
6 * Copyright 2004 CERN. All rights reserved.
7 *
8 */
9
10/** \file Core.h This files contains small utility functions and general definitions for ers.
11 * \version 1.0
12 */
13
14
15#ifndef __ERS_UTIL__
16#define __ERS_UTIL__ "0.3"
17
18#include <string>
19#include <map>
20#include <vector>
21
22namespace ers {
23
26 typedef std::map<std::string, std::string> string_map_type ;
27 typedef std::vector<std::string> string_vector ;
28
29 /** This class contains some general constants.
30 * \brief Miscalenous constants
31 */
32 class Core {
33 static const char* const SEVERITY_NAMES[] ;
34 static const char* const BOOLEAN_NAMES[] ;
35 static const char* const RESPONSIBILITY_NAMES[] ;
36protected:
37public:
38 static const std::string empty_string ;
39 static severity_t parse_severity(const char *s) throw() ; /**< \brief string to severity_t */
40 static severity_t parse_severity(const std::string &s) throw() ; /**< \brief string to severity_t */
41 static const char* to_string(severity_t s) throw() ; /**< \brief severity_t to string */
42 static responsibility_t parse_responsibility(const char *s) throw() ; /**< \brief string to responsibility */
43 static responsibility_t parse_responsibility(const std::string &s) throw() ; /**< \brief string to responsibility */
44 static const char* to_string(responsibility_t s) throw() ; /**< \brief responsibility to string */
45 static int parse_boolean(const char* s) throw() ; /**< \brief string to boolean */
46 static const char* to_string(bool b) throw (); /**< \brief boolean to string */
47 static std::string parse_prefix_string(const char **ptr) throw() ; /**< \brief prefix string data to string */
48 static std::string umangle_gcc_class_name(const char* name) throw() ; /**< \brief unmangles gcc RTTI names */
49 static std::vector<std::string> tokenize(const std::string &text, const std::string &separators) ;
50 } ; // Core
51}
52
53#endif
XmlRpcServer s
Definition: HelloServer.cpp:11
Miscalenous constants.
Definition: Core.h:32
static int parse_boolean(const char *s)
string to boolean
Definition: Core.cxx:88
static std::string parse_prefix_string(const char **ptr)
prefix string data to string
Definition: Core.cxx:114
static std::string umangle_gcc_class_name(const char *name)
unmangles gcc RTTI names
Definition: Core.cxx:135
static responsibility_t parse_responsibility(const char *s)
string to responsibility
Definition: Core.cxx:65
static std::vector< std::string > tokenize(const std::string &text, const std::string &separators)
Definition: Core.cxx:151
static const std::string empty_string
Definition: Core.h:38
static const char * to_string(severity_t s)
severity_t to string
Definition: Core.cxx:22
static severity_t parse_severity(const char *s)
string to severity_t
Definition: Core.cxx:33
enum ers::_responsibility_t responsibility_t
_responsibility_t
Definition: Core.h:25
@ resp_dependency
Definition: Core.h:25
@ resp_client
Definition: Core.h:25
@ resp_unknown
Definition: Core.h:25
@ resp_server
Definition: Core.h:25
@ resp_max
Definition: Core.h:25
_severity_t
Definition: Core.h:24
@ warning
Definition: Core.h:24
@ error
Definition: Core.h:24
@ debug_3
Definition: Core.h:24
@ notification
Definition: Core.h:24
@ debug_0
Definition: Core.h:24
@ debug_2
Definition: Core.h:24
@ severity_max
Definition: Core.h:24
@ information
Definition: Core.h:24
@ fatal
Definition: Core.h:24
@ severity_none
Definition: Core.h:24
@ debug_1
Definition: Core.h:24
std::vector< std::string > string_vector
Definition: Core.h:27
std::map< std::string, std::string > string_map_type
Definition: Core.h:26
enum ers::_severity_t severity_t