Scroom 0.14-48-ga0fee447
Loading...
Searching...
No Matches
Scroom::Utils::Context Class Referenceabstract

#include <context.hh>

Inheritance diagram for Scroom::Utils::Context:
Inheritance graph
Collaboration diagram for Scroom::Utils::Context:
Collaboration graph

Classes

class  name_exists
 
class  name_not_found
 

Public Types

using Ptr = std::shared_ptr< Context >
 
using ConstPtr = std::shared_ptr< const Context >
 

Public Member Functions

virtual void set (std::string name, std::any value)=0
 
virtual const std::any & get (std::string name) const =0
 
virtual std::any try_get (std::string name) const =0
 
- Public Member Functions inherited from Interface
 Interface ()=default
 
 Interface (const Interface &)=delete
 
Interfaceoperator= (const Interface &)=delete
 
 Interface (Interface &&)=delete
 
Interfaceoperator= (Interface &&)=delete
 
virtual ~Interface ()=default
 

Static Public Member Functions

static Ptr create ()
 

Member Typedef Documentation

◆ ConstPtr

using Scroom::Utils::Context::ConstPtr = std::shared_ptr<const Context>

◆ Ptr

using Scroom::Utils::Context::Ptr = std::shared_ptr<Context>

Member Function Documentation

◆ create()

Context::Ptr Scroom::Utils::Context::create ( )
static
15{ return std::make_shared<SingleContext>(); }

Referenced by Scroom::Utils::RecursiveContext::create().

Here is the caller graph for this function:

◆ get()

virtual const std::any & Scroom::Utils::Context::get ( std::string  name) const
pure virtual

◆ set()

virtual void Scroom::Utils::Context::set ( std::string  name,
std::any  value 
)
pure virtual

◆ try_get()

virtual std::any Scroom::Utils::Context::try_get ( std::string  name) const
pure virtual

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