CPUnit 0.95 (beta)
The REAL C++ port of JUnit.
cpunit::RegInfo Class Reference

Registration data for unit tests. More...

#include <cpunit_RegInfo.hpp>

List of all members.

Public Member Functions

 RegInfo ()
 RegInfo (const std::string _path, const std::string _name, const std::string _file, const std::string _line)
 Constructs a complete RegInfo object.
 RegInfo (const RegInfo &o)
virtual ~RegInfo ()
RegInfooperator= (const RegInfo &o)
std::string get_path () const
std::string get_name () const
std::string get_file () const
std::string get_line () const
std::string to_string () const
 Formatted string content.

Private Attributes

const std::string * path
const std::string * name
const std::string * file
const std::string * line
StringFlyweightStoreUsage counter

Detailed Description

Registration data for unit tests.

As many of the texts in the RegInfo objects occure in more than one test, the object uses the StringFlyweightStore to reduce memory usage due to heavy string use.

Definition at line 46 of file cpunit_RegInfo.hpp.


Constructor & Destructor Documentation

cpunit::RegInfo::RegInfo ( )

Definition at line 37 of file cpunit_RegInfo.cpp.

cpunit::RegInfo::RegInfo ( const std::string  _path,
const std::string  _name,
const std::string  _file,
const std::string  _line 
)

Constructs a complete RegInfo object.

Parameters:
_pathThe namespace where the test resides, prefixed by '::'.
_nameThe test name.
_fileThe name of the file where the test is regstered.
_lineThe line number where the test starts.

Definition at line 54 of file cpunit_RegInfo.cpp.

cpunit::RegInfo::RegInfo ( const RegInfo o)

Definition at line 65 of file cpunit_RegInfo.cpp.

cpunit::RegInfo::~RegInfo ( ) [virtual]

Definition at line 75 of file cpunit_RegInfo.cpp.


Member Function Documentation

std::string cpunit::RegInfo::get_file ( ) const
std::string cpunit::RegInfo::get_line ( ) const
std::string cpunit::RegInfo::get_name ( ) const
std::string cpunit::RegInfo::get_path ( ) const
cpunit::RegInfo & cpunit::RegInfo::operator= ( const RegInfo o)

Definition at line 81 of file cpunit_RegInfo.cpp.

std::string cpunit::RegInfo::to_string ( ) const

Formatted string content.

Returns:
A string containing all the data in the RegInfo object.

Definition at line 130 of file cpunit_RegInfo.cpp.


Member Data Documentation

const std::string* cpunit::RegInfo::file [private]

Definition at line 49 of file cpunit_RegInfo.hpp.

const std::string* cpunit::RegInfo::line [private]

Definition at line 50 of file cpunit_RegInfo.hpp.

const std::string* cpunit::RegInfo::name [private]

Definition at line 48 of file cpunit_RegInfo.hpp.

const std::string* cpunit::RegInfo::path [private]

Definition at line 47 of file cpunit_RegInfo.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines