BOSS 8.0.0
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 ers::NotImplemented::CLASS_NAME, create_issue );
20} // namespace
21
23
25 this->setup( c.function().c_str(), "", true );
26} // NotImplemented
27
28/** Builds the message for a the not implemented issue.
29 * \param condition_text should contain the problem condition, i.e the part that is not
30 * implemented, this should contain the function name or some similar information \param msg an
31 * optional message (this is displayed between parentheses). \param constant_expression is the
32 * condition constant, this should be the case for not implemented functions. \return A
33 * complete information message.
34 */
35
36std::string ers::NotImplemented::build_message( const char* condition_text,
37 const std::string& msg,
38 bool constant_expression ) throw() {
39 std::ostringstream message_stream;
40 (void)constant_expression;
41 message_stream << "Function in " << condition_text;
42 if ( !msg.empty() ) { message_stream << "(" << msg << ")"; }
43 message_stream << " is not implemented";
44 return message_stream.str();
45} // build_message
46
47const char* ers::NotImplemented::get_class_name() const throw() { return CLASS_NAME; }
XmlRpcServer s
void setup(const char *condition, const std::string &message, bool constant_expression)
Assertion(const Context &context, severity_t s)
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
Root Issue class.
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