Specs
Beautiful C++ Test Framework
Loading...
Searching...
No Matches
SpecsCpp::ISpecGroup Struct Referenceabstract

#include <API.h>

Inheritance diagram for SpecsCpp::ISpecGroup:
SpecsCpp::ISpecComponent SpecsCpp::ISpecDocumented SpecsCpp::ISpecHasVariables SpecsCpp::SpecGroup

Public Types

using ForEachGroupFn = IFunctionPointer< void(ISpecGroup *)>
 
using ForEachSpecFn = IFunctionPointer< void(ISpec *)>
 
using ForEachSetupFn = IFunctionPointer< void(ISpecSetup *)>
 
using ForEachTeardownFn = IFunctionPointer< void(ISpecTeardown *)>
 

Public Member Functions

virtual ~ISpecGroup ()=default
 
virtual void add_group (ISpecGroup *)=0
 
virtual void add_test (ISpec *)=0
 
virtual void add_setup (ISpecSetup *)=0
 
virtual void add_teardown (ISpecTeardown *)=0
 
virtual void add_one_time_setup (ISpecSetup *)=0
 
virtual void add_one_time_teardown (ISpecTeardown *)=0
 
virtual void foreach_group (ForEachGroupFn *) const =0
 
virtual void foreach_test (ForEachSpecFn *) const =0
 
virtual void foreach_setup (ForEachSetupFn *) const =0
 
virtual void foreach_teardown (ForEachTeardownFn *) const =0
 
virtual void foreach_one_time_setup (ForEachSetupFn *) const =0
 
virtual void foreach_one_time_teardown (ForEachTeardownFn *) const =0
 
virtual void merge (ISpecGroup *)=0
 
void foreach_group (std::function< void(ISpecGroup *)> fn) const
 
void foreach_test (std::function< void(ISpec *)> fn) const
 
void foreach_setup (std::function< void(ISpecSetup *)> fn) const
 
void foreach_teardown (std::function< void(ISpecTeardown *)> fn) const
 
void foreach_one_time_setup (std::function< void(ISpecSetup *)> fn) const
 
void foreach_one_time_teardown (std::function< void(ISpecTeardown *)> fn) const
 
- Public Member Functions inherited from SpecsCpp::ISpecComponent
virtual ~ISpecComponent ()=default
 
virtual ISpecGroupgroup () const =0
 
virtual void set_group (ISpecGroup *group)=0
 
virtual ISpecDataValueCollectiondata () const =0
 
virtual ISpecTagCollectiontags () const =0
 
virtual SpecComponentType type () const =0
 
virtual bool skip () const =0
 
virtual void mark_skipped (bool skip=true)=0
 
- Public Member Functions inherited from SpecsCpp::ISpecDocumented
virtual ~ISpecDocumented ()=default
 
virtual const char * description () const =0
 
virtual const char * full_description () const =0
 
- Public Member Functions inherited from SpecsCpp::ISpecHasVariables
virtual ~ISpecHasVariables ()=default
 
virtual ISpecVariableCollectionvariables () const =0
 
ISpecVariableCollectionvars () const
 
bool has_var (const char *name) const
 
IVoidPointer * var (const char *name) const
 
template<typename T >
var (const char *name) const
 
template<typename T >
T * var (const char *name, T *value, bool destructable=true)
 
template<typename T >
void var (const char *name, T &&value, bool destructable=true)
 
template<typename T >
T * managed_var (const char *name, T *value)
 
template<typename T >
void managed_var (const char *name, T &&value)
 
template<typename T >
T * unmanaged_var (const char *name, T *value)
 
template<typename T >
void unmanaged_var (const char *name, T &&value)
 
const char * var_text (const char *name)
 
const char * var_text (const char *name, const char *value)
 

Detailed Description

Definition at line 313 of file API.h.

Member Typedef Documentation

◆ ForEachGroupFn

using SpecsCpp::ISpecGroup::ForEachGroupFn = IFunctionPointer<void(ISpecGroup*)>

Definition at line 316 of file API.h.

◆ ForEachSetupFn

using SpecsCpp::ISpecGroup::ForEachSetupFn = IFunctionPointer<void(ISpecSetup*)>

Definition at line 318 of file API.h.

◆ ForEachSpecFn

using SpecsCpp::ISpecGroup::ForEachSpecFn = IFunctionPointer<void(ISpec*)>

Definition at line 317 of file API.h.

◆ ForEachTeardownFn

using SpecsCpp::ISpecGroup::ForEachTeardownFn = IFunctionPointer<void(ISpecTeardown*)>

Definition at line 319 of file API.h.

Constructor & Destructor Documentation

◆ ~ISpecGroup()

virtual SpecsCpp::ISpecGroup::~ISpecGroup ( )
virtualdefault

Member Function Documentation

◆ add_group()

virtual void SpecsCpp::ISpecGroup::add_group ( ISpecGroup )
pure virtual

◆ add_one_time_setup()

virtual void SpecsCpp::ISpecGroup::add_one_time_setup ( ISpecSetup )
pure virtual

Implemented in SpecsCpp::SpecGroup.

◆ add_one_time_teardown()

virtual void SpecsCpp::ISpecGroup::add_one_time_teardown ( ISpecTeardown )
pure virtual

Implemented in SpecsCpp::SpecGroup.

◆ add_setup()

virtual void SpecsCpp::ISpecGroup::add_setup ( ISpecSetup )
pure virtual

Implemented in SpecsCpp::SpecGroup.

◆ add_teardown()

virtual void SpecsCpp::ISpecGroup::add_teardown ( ISpecTeardown )
pure virtual

Implemented in SpecsCpp::SpecGroup.

◆ add_test()

virtual void SpecsCpp::ISpecGroup::add_test ( ISpec )
pure virtual

Implemented in SpecsCpp::SpecGroup.

◆ foreach_group() [1/2]

virtual void SpecsCpp::ISpecGroup::foreach_group ( ForEachGroupFn ) const
pure virtual

◆ foreach_group() [2/2]

void SpecsCpp::ISpecGroup::foreach_group ( std::function< void(ISpecGroup *)>  fn) const
inline

Definition at line 336 of file API.h.

336 {
337 auto callback = unique_function_pointer(fn);
338 this->foreach_group(callback.get());
339 }
virtual void foreach_group(ForEachGroupFn *) const =0

◆ foreach_one_time_setup() [1/2]

virtual void SpecsCpp::ISpecGroup::foreach_one_time_setup ( ForEachSetupFn ) const
pure virtual

◆ foreach_one_time_setup() [2/2]

void SpecsCpp::ISpecGroup::foreach_one_time_setup ( std::function< void(ISpecSetup *)>  fn) const
inline

Definition at line 352 of file API.h.

352 {
353 auto callback = unique_function_pointer(fn);
354 this->foreach_one_time_setup(callback.get());
355 }
virtual void foreach_one_time_setup(ForEachSetupFn *) const =0

◆ foreach_one_time_teardown() [1/2]

virtual void SpecsCpp::ISpecGroup::foreach_one_time_teardown ( ForEachTeardownFn ) const
pure virtual

◆ foreach_one_time_teardown() [2/2]

void SpecsCpp::ISpecGroup::foreach_one_time_teardown ( std::function< void(ISpecTeardown *)>  fn) const
inline

Definition at line 356 of file API.h.

356 {
357 auto callback = unique_function_pointer(fn);
358 this->foreach_one_time_teardown(callback.get());
359 }
virtual void foreach_one_time_teardown(ForEachTeardownFn *) const =0

◆ foreach_setup() [1/2]

virtual void SpecsCpp::ISpecGroup::foreach_setup ( ForEachSetupFn ) const
pure virtual

◆ foreach_setup() [2/2]

void SpecsCpp::ISpecGroup::foreach_setup ( std::function< void(ISpecSetup *)>  fn) const
inline

Definition at line 344 of file API.h.

344 {
345 auto callback = unique_function_pointer(fn);
346 this->foreach_setup(callback.get());
347 }
virtual void foreach_setup(ForEachSetupFn *) const =0

◆ foreach_teardown() [1/2]

virtual void SpecsCpp::ISpecGroup::foreach_teardown ( ForEachTeardownFn ) const
pure virtual

◆ foreach_teardown() [2/2]

void SpecsCpp::ISpecGroup::foreach_teardown ( std::function< void(ISpecTeardown *)>  fn) const
inline

Definition at line 348 of file API.h.

348 {
349 auto callback = unique_function_pointer(fn);
350 this->foreach_teardown(callback.get());
351 }
virtual void foreach_teardown(ForEachTeardownFn *) const =0

◆ foreach_test() [1/2]

virtual void SpecsCpp::ISpecGroup::foreach_test ( ForEachSpecFn ) const
pure virtual

◆ foreach_test() [2/2]

void SpecsCpp::ISpecGroup::foreach_test ( std::function< void(ISpec *)>  fn) const
inline

Definition at line 340 of file API.h.

340 {
341 auto callback = unique_function_pointer(fn);
342 this->foreach_test(callback.get());
343 }
virtual void foreach_test(ForEachSpecFn *) const =0

◆ merge()

virtual void SpecsCpp::ISpecGroup::merge ( ISpecGroup )
pure virtual

Implemented in SpecsCpp::SpecGroup.

Referenced by SpecsCpp::Entrypoint::main().


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