HiveMind
Public Member Functions | Private Member Functions | Private Attributes | List of all members
BittyBuzzLib< Container > Class Template Reference

A buzz library, can register on the global scope or on a table. More...

#include <BittyBuzzLib.h>

Inheritance diagram for BittyBuzzLib< Container >:
Inheritance graph
Collaboration diagram for BittyBuzzLib< Container >:
Collaboration graph

Public Member Functions

 BittyBuzzLib (uint16_t libTableId, const Container &container)
 BittyBuzzLib constructor, will register on a table/namespace. More...
 
 BittyBuzzLib (const Container &container)
 BittyBuzzLib constructor, will register on the global scope. More...
 
 ~BittyBuzzLib () override=default
 
bool registerLib () override
 register the library in the vm, each lib will have it's own table, if the lib table id is 0, the data will be registered on the global scope More...
 
- Public Member Functions inherited from IBittyBuzzLib
virtual ~IBittyBuzzLib ()=default
 

Private Member Functions

bool registerLibGlobal ()
 
bool registerLibTable ()
 

Private Attributes

const std::optional< uint16_t > m_libTableId
 
const Container m_container
 

Detailed Description

template<typename Container>
class BittyBuzzLib< Container >

A buzz library, can register on the global scope or on a table.

Template Parameters
Containera container that implements a forward iterator of BittyBuzzLibMemberRegister

Constructor & Destructor Documentation

◆ BittyBuzzLib() [1/2]

template<typename Container >
BittyBuzzLib< Container >::BittyBuzzLib ( uint16_t  libTableId,
const Container &  container 
)

BittyBuzzLib constructor, will register on a table/namespace.

Parameters
libTableIdthe string id of the table
containera container of BittyBuzzLibMemberRegister, need to implement a forward iterator. std::array<BittyBuzzLibMemberRegister, XX> or std::vector<BittyBuzzLibMemberRegister> are probably the most common ones

◆ BittyBuzzLib() [2/2]

template<typename Container >
BittyBuzzLib< Container >::BittyBuzzLib ( const Container &  container)

BittyBuzzLib constructor, will register on the global scope.

Parameters
containera container of BittyBuzzLibMemberRegister

◆ ~BittyBuzzLib()

template<typename Container >
BittyBuzzLib< Container >::~BittyBuzzLib ( )
overridedefault

Member Function Documentation

◆ registerLib()

template<typename Container >
bool BittyBuzzLib< Container >::registerLib ( )
overridevirtual

register the library in the vm, each lib will have it's own table, if the lib table id is 0, the data will be registered on the global scope

Implements IBittyBuzzLib.

◆ registerLibGlobal()

template<typename Container >
bool BittyBuzzLib< Container >::registerLibGlobal ( )
private

◆ registerLibTable()

template<typename Container >
bool BittyBuzzLib< Container >::registerLibTable ( )
private

Member Data Documentation

◆ m_container

template<typename Container >
const Container BittyBuzzLib< Container >::m_container
private

◆ m_libTableId

template<typename Container >
const std::optional<uint16_t> BittyBuzzLib< Container >::m_libTableId
private

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