BOSS
7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
NotImplemented.cxx
Go to the documentation of this file.
1
/*
2
* NotImplemented.cxx
3
* ers
4
*
5
* Created by Matthias Wiesmann on 08.12.04.
6
* Copyright 2004 CERN. All rights reserved.
7
*
8
*/
9
10
#include "
ers/NotImplemented.h
"
11
#include <iostream>
12
#include <sstream>
13
14
const
char
*
const
ers::NotImplemented::CLASS_NAME
=
"ers::NotImplemented"
;
15
16
namespace
{
17
ers::Issue
*create_issue() {
return
new
ers::NotImplemented
(); }
18
bool
registered =
ers::IssueFactory::instance
()->
register_issue
(
ers::NotImplemented::CLASS_NAME
,create_issue) ;
19
}
20
21
ers::NotImplemented::NotImplemented
() :
Assertion
() {}
22
23
ers::NotImplemented::NotImplemented
(
const
Context
&c,
severity_t
s
) :
Assertion
(c,
s
) {
24
this->
setup
(c.
function
().c_str(),
""
,
true
);
25
}
// NotImplemented
26
27
/** Builds the message for a the not implemented issue.
28
* \param condition_text should contain the problem condition, i.e the part that is not implemented,
29
* this should contain the function name or some similar information
30
* \param msg an optional message (this is displayed between parentheses).
31
* \param constant_expression is the condition constant, this should be the case for not implemented functions.
32
* \return A complete information message.
33
*/
34
35
std::string
ers::NotImplemented::build_message
(
const
char
* condition_text,
const
std::string &msg,
bool
constant_expression)
throw
() {
36
std::ostringstream message_stream ;
37
(void) constant_expression ;
38
message_stream <<
"Function in "
<< condition_text ;
39
if
(! msg.empty()) {
40
message_stream <<
"("
<< msg <<
")"
;
41
}
42
message_stream <<
" is not implemented"
;
43
return
message_stream.str();
44
}
// build_message
45
46
47
const
char
*
ers::NotImplemented::get_class_name
()
const
throw () {
return
CLASS_NAME ;}
48
49
s
XmlRpcServer s
Definition
HelloServer.cpp:11
NotImplemented.h
ers::Assertion
This Issue represents a basic assertion.
Definition
Event/ers/ers-00-00-03/ers/Assertion.h:32
ers::Assertion::setup
void setup(const char *condition, const std::string &message, bool constant_expression)
Definition
Event/ers/ers-00-00-03/src/Assertion.cxx:56
ers::Context
Source context for Issue.
Definition
Context.h:42
ers::Context::function
const std::string & function() const
Definition
Context.cxx:114
ers::IssueFactory::register_issue
bool register_issue(const std::string &name, CreateIssueCallback creator)
register an issue factory
Definition
IssueFactory.cxx:47
ers::IssueFactory::instance
static IssueFactory * instance()
method to access singleton
Definition
IssueFactory.cxx:28
ers::Issue
Root Issue class.
Definition
ers/ers-00-00-03/ers/Issue.h:40
ers::NotImplemented
Macro to mark unimplemented code.
Definition
NotImplemented.h:23
ers::NotImplemented::build_message
virtual std::string build_message(const char *condition_text, const std::string &message, bool constant_expression=false)
Definition
NotImplemented.cxx:35
ers::NotImplemented::get_class_name
virtual const char * get_class_name() const
Get key for class (used for serialisation)
Definition
NotImplemented.cxx:47
ers::NotImplemented::CLASS_NAME
static const char *const CLASS_NAME
Definition
NotImplemented.h:28
ers::NotImplemented::NotImplemented
NotImplemented()
Definition
NotImplemented.cxx:21
ers::severity_t
enum ers::_severity_t severity_t
7.1.1
Event
ers
ers-00-00-03
src
NotImplemented.cxx
Generated by
1.12.0