OKlibrary  0.2.1.6
OKlib::Messages::MessagesPrePost Class Reference

Extends MessagesLines by managing two strings for prefixing and postfixing lines. More...

#include <LineHandling.hpp>

Inheritance diagram for OKlib::Messages::MessagesPrePost:
OKlib::Messages::MessagesLines OKlib::Messages::MessagesBase OKlib::Messages::messages::LevelNames OKlib::Messages::Utilities::FileIdentification OKlib::Messages::Utilities::LineIdentification OKlib::TestSystem::messages::BasicTestDescription OKlib::TestSystem::messages::ErrorDescription OKlib::TestSystem::messages::LogDescription OKlib::TestSystem::messages::NotEqual< T1, T2 > OKlib::TestSystem::messages::TestException OKlib::TestSystem::messages::TestLevelDescriptions

List of all members.

Public Types

typedef std::string::size_type size_type

Public Member Functions

 MessagesPrePost ()
const std::string & prefix () const
std::string & prefix ()
const std::string & postfix () const
std::string & postfix ()
MessagesPrePostset_prefix (const size_type n)
MessagesPrePostset_prefix (const std::string s)
MessagesPrePostset_postfix (const std::string s)
MessagesPrePostcp_pp (const MessagesPrePost &m)

Protected Member Functions

std::ostream & l_start (std::ostream &out) const
void l_end (std::ostream &out) const

Detailed Description

Extends MessagesLines by managing two strings for prefixing and postfixing lines.

Via the various "prefix" and "postfix" member functions the line-start and line-end can be set to some string; default is empty for line-start and "\n" for line-end. The prefix- and postfix-behaviour should always be free to change (and thus care must be taken when using it internally).

By the cp_pp ("copy pre-post") member function both the pre- and the postfix-string are copied from some other message object; this is used, when a MessagesPrePost-class uses another MessagesPrePost-class object: before outputting this object, cp_pp should be applied to set the pre-post-behavour of that other object accordingly.

Definition at line 55 of file LineHandling.hpp.


Member Typedef Documentation

typedef std::string::size_type OKlib::Messages::MessagesPrePost::size_type

Definition at line 71 of file LineHandling.hpp.


Constructor & Destructor Documentation

Definition at line 61 of file LineHandling.hpp.


Member Function Documentation

const std::string& OKlib::Messages::MessagesPrePost::postfix ( ) const [inline]

Definition at line 68 of file LineHandling.hpp.

Referenced by cp_pp().

std::string& OKlib::Messages::MessagesPrePost::postfix ( ) [inline]

Definition at line 69 of file LineHandling.hpp.

const std::string& OKlib::Messages::MessagesPrePost::prefix ( ) const [inline]

Definition at line 66 of file LineHandling.hpp.

Referenced by cp_pp(), and OKlib::TestSystem::messages::LogDescription::print().

std::string& OKlib::Messages::MessagesPrePost::prefix ( ) [inline]

Definition at line 67 of file LineHandling.hpp.

Definition at line 78 of file LineHandling.hpp.

References s.

Definition at line 75 of file LineHandling.hpp.

References s.


The documentation for this class was generated from the following file: