Specs
Beautiful C++ Test Framework
Loading...
Searching...
No Matches
SpecsCpp::GlobalSpecCodeBlocks Class Reference

#include <GlobalSpecCodeBlocks.h>

Public Member Functions

void register_code_block (std::function< void()> codeBlock)
 
void run_code_blocks ()
 

Static Public Member Functions

static GlobalSpecCodeBlocksinstance ()
 

Detailed Description

Definition at line 8 of file GlobalSpecCodeBlocks.h.

Member Function Documentation

◆ instance()

static GlobalSpecCodeBlocks & SpecsCpp::GlobalSpecCodeBlocks::instance ( )
inlinestatic

Definition at line 12 of file GlobalSpecCodeBlocks.h.

12 {
13 static GlobalSpecCodeBlocks instance;
14 return instance;
15 }
static GlobalSpecCodeBlocks & instance()

Referenced by instance(), SpecsCpp::Entrypoint::main(), and SpecsCpp_Load().

◆ register_code_block()

void SpecsCpp::GlobalSpecCodeBlocks::register_code_block ( std::function< void()>  codeBlock)
inline

Definition at line 17 of file GlobalSpecCodeBlocks.h.

17 {
18 _codeBlocks.push_back(std::move(codeBlock));
19 }

◆ run_code_blocks()

void SpecsCpp::GlobalSpecCodeBlocks::run_code_blocks ( )
inline

Definition at line 21 of file GlobalSpecCodeBlocks.h.

21 {
22 for (auto& codeBlock : _codeBlocks) codeBlock();
23 }

Referenced by SpecsCpp::Entrypoint::main(), and SpecsCpp_Load().


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