HiveMind
BittyBuzzLib.h
Go to the documentation of this file.
1 #ifndef __BITTYBUZZSTDLIB_H_
2 #define __BITTYBUZZSTDLIB_H_
3 
4 #include "IBittyBuzzLib.h"
5 #include <cstdint>
6 #include <optional>
7 
10 template <typename Container>
11 class BittyBuzzLib : public IBittyBuzzLib {
12  public:
18  BittyBuzzLib(uint16_t libTableId, const Container& container);
19 
22  BittyBuzzLib(const Container& container);
23 
24  ~BittyBuzzLib() override = default;
25 
26  bool registerLib() override;
27 
28  private:
29  bool registerLibGlobal();
30  bool registerLibTable();
31  const std::optional<uint16_t> m_libTableId;
32  const Container m_container;
33 };
34 
35 #include "BittyBuzzLib.tpp"
36 
37 #endif // __BITTYBUZZSTDLIB_H_
BittyBuzzLib::~BittyBuzzLib
~BittyBuzzLib() override=default
BittyBuzzLib::registerLib
bool registerLib() override
register the library in the vm, each lib will have it's own table, if the lib table id is 0,...
BittyBuzzLib::m_libTableId
const std::optional< uint16_t > m_libTableId
Definition: BittyBuzzLib.h:31
IBittyBuzzLib
register the std lib functions in the bbvm via tables. such as the maths
Definition: IBittyBuzzLib.h:6
BittyBuzzLib::registerLibTable
bool registerLibTable()
BittyBuzzLib::BittyBuzzLib
BittyBuzzLib(uint16_t libTableId, const Container &container)
BittyBuzzLib constructor, will register on a table/namespace.
BittyBuzzLib
A buzz library, can register on the global scope or on a table.
Definition: BittyBuzzLib.h:11
IBittyBuzzLib.h
BittyBuzzLib::m_container
const Container m_container
Definition: BittyBuzzLib.h:32
BittyBuzzLib::registerLibGlobal
bool registerLibGlobal()