OTest2
A C++ testing framework
Classes | Public Member Functions | List of all members
OTest2::ObjectPath Class Reference

This is a simple object keeping path to current testing object. More...

#include <objectpath.h>

Classes

struct  Impl
 

Public Member Functions

 ObjectPath (const ObjectPath &)=delete
 
ObjectPathoperator= (const ObjectPath &)=delete
 
 ObjectPath ()
 Ctor. More...
 
 ObjectPath (const std::string &full_path_)
 Ctor with initial path. More...
 
 ~ObjectPath ()
 Dtor. More...
 
void pushName (const std::string &name_)
 Push name of currently entering testing object. More...
 
void popName ()
 Pop name of currently leaving testing object. More...
 
void appendParameter (const std::string &name_, const std::string &value_)
 Append parameter to current testing object. More...
 
std::string getCurrentName () const
 Get name at the top of the stack. More...
 
const ParametersgetCurrentParameters () const
 Get parameters of current object. More...
 
std::string getCurrentPath () const
 Get path of current object. More...
 
std::string getRegressionKey (const std::string &local_key_) const
 Create key of a regression test mark according to current object path. More...
 
bool isPrefixOf (const ObjectPath &path_) const noexcept
 Tell us whether this object is a prefix of specified path_. More...
 

Detailed Description

This is a simple object keeping path to current testing object.

Definition at line 32 of file objectpath.h.

Constructor & Destructor Documentation

◆ ObjectPath() [1/3]

OTest2::ObjectPath::ObjectPath ( const ObjectPath )
delete

◆ ObjectPath() [2/3]

OTest2::ObjectPath::ObjectPath ( )

Ctor.

Definition at line 56 of file objectpath.cpp.

◆ ObjectPath() [3/3]

OTest2::ObjectPath::ObjectPath ( const std::string &  full_path_)
explicit

Ctor with initial path.

Parameters
full_path_The full path (parts of path separated by '::')

Definition at line 61 of file objectpath.cpp.

◆ ~ObjectPath()

OTest2::ObjectPath::~ObjectPath ( )

Dtor.

Definition at line 82 of file objectpath.cpp.

Member Function Documentation

◆ appendParameter()

void OTest2::ObjectPath::appendParameter ( const std::string &  name_,
const std::string &  value_ 
)

Append parameter to current testing object.

Parameters
name_Name of the parameter
value_Value of the parameter

Definition at line 98 of file objectpath.cpp.

◆ getCurrentName()

std::string OTest2::ObjectPath::getCurrentName ( ) const

Get name at the top of the stack.

Returns
the name

Definition at line 106 of file objectpath.cpp.

◆ getCurrentParameters()

const Parameters & OTest2::ObjectPath::getCurrentParameters ( ) const

Get parameters of current object.

Returns
The parameters

Definition at line 112 of file objectpath.cpp.

◆ getCurrentPath()

std::string OTest2::ObjectPath::getCurrentPath ( ) const

Get path of current object.

Returns
The path

Definition at line 118 of file objectpath.cpp.

◆ getRegressionKey()

std::string OTest2::ObjectPath::getRegressionKey ( const std::string &  local_key_) const

Create key of a regression test mark according to current object path.

Parameters
local_key_Key of the test mark in its local scope
Returns
The regression key

Definition at line 127 of file objectpath.cpp.

◆ isPrefixOf()

bool OTest2::ObjectPath::isPrefixOf ( const ObjectPath path_) const
noexcept

Tell us whether this object is a prefix of specified path_.

Definition at line 143 of file objectpath.cpp.

◆ operator=()

ObjectPath& OTest2::ObjectPath::operator= ( const ObjectPath )
delete

◆ popName()

void OTest2::ObjectPath::popName ( )

Pop name of currently leaving testing object.

Definition at line 93 of file objectpath.cpp.

◆ pushName()

void OTest2::ObjectPath::pushName ( const std::string &  name_)

Push name of currently entering testing object.

Parameters
name_The name

Definition at line 86 of file objectpath.cpp.


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