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

#include <API.h>

Inheritance diagram for SpecsCpp::ISpecVariableCollection:
SpecsCpp::SpecVariableCollection

Public Types

using ForEachVariableFn = IFunctionPointer< void(IVoidPointer *)>
 

Public Member Functions

virtual ~ISpecVariableCollection ()=default
 
virtual void set (const char *name, IVoidPointer *, bool destructable=true)=0
 
virtual void unset (const char *name)=0
 
virtual bool is_destructable (const char *name) const =0
 
virtual void set_destructable (const char *name, bool destructable=true)=0
 
virtual bool exists (const char *name) const =0
 
virtual IVoidPointer * get (const char *name) const =0
 
virtual void foreach_variable (ForEachVariableFn *) const =0
 
virtual void clear ()=0
 
void foreach (std::function< void(IVoidPointer *)> fn) const
 

Detailed Description

Definition at line 135 of file API.h.

Member Typedef Documentation

◆ ForEachVariableFn

using SpecsCpp::ISpecVariableCollection::ForEachVariableFn = IFunctionPointer<void(IVoidPointer*)>

Definition at line 136 of file API.h.

Constructor & Destructor Documentation

◆ ~ISpecVariableCollection()

virtual SpecsCpp::ISpecVariableCollection::~ISpecVariableCollection ( )
virtualdefault

Member Function Documentation

◆ clear()

virtual void SpecsCpp::ISpecVariableCollection::clear ( )
pure virtual

◆ exists()

virtual bool SpecsCpp::ISpecVariableCollection::exists ( const char *  name) const
pure virtual

◆ foreach()

void SpecsCpp::ISpecVariableCollection::foreach ( std::function< void(IVoidPointer *)>  fn) const
inline

Definition at line 148 of file API.h.

148 {
149 auto callback = unique_function_pointer(fn);
150 this->foreach_variable(callback.get());
151 }
virtual void foreach_variable(ForEachVariableFn *) const =0

◆ foreach_variable()

virtual void SpecsCpp::ISpecVariableCollection::foreach_variable ( ForEachVariableFn ) const
pure virtual

Implemented in SpecsCpp::SpecVariableCollection.

Referenced by foreach().

◆ get()

virtual IVoidPointer * SpecsCpp::ISpecVariableCollection::get ( const char *  name) const
pure virtual

◆ is_destructable()

virtual bool SpecsCpp::ISpecVariableCollection::is_destructable ( const char *  name) const
pure virtual

◆ set()

◆ set_destructable()

virtual void SpecsCpp::ISpecVariableCollection::set_destructable ( const char *  name,
bool  destructable = true 
)
pure virtual

◆ unset()

virtual void SpecsCpp::ISpecVariableCollection::unset ( const char *  name)
pure virtual

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