MySQL 8.0.39
Source Code Documentation
server_mock::DukHeap Class Reference

memory heap of duk contexts. More...

Classes

class  HeapDeleter
 

Public Member Functions

 DukHeap (std::vector< std::string > module_prefixes, std::shared_ptr< MockServerGlobalScope > shared_globals)
 
void prepare (std::string filename, std::map< std::string, std::function< std::string()> > &session_data)
 
duk_context * context ()
 

Private Member Functions

void prepare_process_object ()
 
void prepare_mysqld_object (const std::map< std::string, std::function< std::string()> > &session_data)
 
void load_script (const std::string &filename)
 

Private Attributes

std::unique_ptr< duk_context, HeapDeleterheap_ {}
 
std::shared_ptr< MockServerGlobalScopeshared_
 

Static Private Attributes

static std::mutex scripts_mtx_ {}
 
static std::map< std::string, std::string > scripts_ {}
 

Detailed Description

memory heap of duk contexts.

contains:

  • execution threads
  • stacks
  • stashes
  • ...

Constructor & Destructor Documentation

◆ DukHeap()

server_mock::DukHeap::DukHeap ( std::vector< std::string >  module_prefixes,
std::shared_ptr< MockServerGlobalScope shared_globals 
)
inline

Member Function Documentation

◆ context()

duk_context * server_mock::DukHeap::context ( )
inline

◆ load_script()

void server_mock::DukHeap::load_script ( const std::string &  filename)
inlineprivate

◆ prepare()

void server_mock::DukHeap::prepare ( std::string  filename,
std::map< std::string, std::function< std::string()> > &  session_data 
)
inline

◆ prepare_mysqld_object()

void server_mock::DukHeap::prepare_mysqld_object ( const std::map< std::string, std::function< std::string()> > &  session_data)
inlineprivate

◆ prepare_process_object()

void server_mock::DukHeap::prepare_process_object ( )
inlineprivate

Member Data Documentation

◆ heap_

std::unique_ptr<duk_context, HeapDeleter> server_mock::DukHeap::heap_ {}
private

◆ scripts_

std::map< std::string, std::string > server_mock::DukHeap::scripts_ {}
staticprivate

◆ scripts_mtx_

std::mutex server_mock::DukHeap::scripts_mtx_ {}
staticprivate

◆ shared_

std::shared_ptr<MockServerGlobalScope> server_mock::DukHeap::shared_
private

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