BOSS 7.0.2
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
14const char * const ers::NotImplemented::CLASS_NAME = "ers::NotImplemented" ;
15
16namespace {
17 ers::Issue *create_issue() { return new ers::NotImplemented(); }
19}
20
22
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
35std::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
47const char* ers::NotImplemented::get_class_name() const throw () { return CLASS_NAME ;}
48
49
XmlRpcServer s
Definition: HelloServer.cpp:11
This Issue represents a basic assertion.
void setup(const char *condition, const std::string &message, bool constant_expression)
Source context for Issue.
const std::string & function() const
Definition: Context.cxx:114
bool register_issue(const std::string &name, CreateIssueCallback creator)
register an issue factory
static IssueFactory * instance()
method to access singleton
Macro to mark unimplemented code.
virtual std::string build_message(const char *condition_text, const std::string &message, bool constant_expression=false)
virtual const char * get_class_name() const
Get key for class (used for serialisation)
enum ers::_severity_t severity_t