HiveMind
BittyBuzzStringResolver.h
Go to the documentation of this file.
1 
2 #ifndef __BITTYBUZZSTRINGRESOLVER_H_
3 #define __BITTYBUZZSTRINGRESOLVER_H_
4 
6 #include <logger/ILogger.h>
7 #include <utility>
8 
10  public:
11  BittyBuzzStringResolver(const std::pair<const uint16_t, const char*>* stringArray,
12  uint16_t arrayLength,
13  uint16_t stringIdOffset,
14  ILogger& logger);
15 
16  ~BittyBuzzStringResolver() override = default;
17 
18  std::optional<const char*> getString(uint16_t stringId) const override;
19 
20  private:
22  const std::pair<const uint16_t, const char*>* m_stringArray;
23  const uint16_t m_arrayLength;
24  const uint16_t m_stringIdOffset;
25 };
26 
27 #endif // __BITTYBUZZSTRINGRESOLVER_H_
BittyBuzzStringResolver::BittyBuzzStringResolver
BittyBuzzStringResolver(const std::pair< const uint16_t, const char * > *stringArray, uint16_t arrayLength, uint16_t stringIdOffset, ILogger &logger)
Definition: BittyBuzzStringResolver.cpp:3
BittyBuzzStringResolver::m_stringArray
const std::pair< const uint16_t, const char * > * m_stringArray
Definition: BittyBuzzStringResolver.h:22
BittyBuzzStringResolver::getString
std::optional< const char * > getString(uint16_t stringId) const override
Get the string from the stringId.
Definition: BittyBuzzStringResolver.cpp:13
BittyBuzzStringResolver::~BittyBuzzStringResolver
~BittyBuzzStringResolver() override=default
IBittyBuzzStringResolver
Class that resolves a string from the bittybuzz virtual machine.
Definition: IBittyBuzzStringResolver.h:10
BittyBuzzStringResolver
Definition: BittyBuzzStringResolver.h:9
ILogger
A logger class with basic logging capabilities.
Definition: ILogger.h:35
BittyBuzzStringResolver::m_arrayLength
const uint16_t m_arrayLength
Definition: BittyBuzzStringResolver.h:23
IBittyBuzzStringResolver.h
BittyBuzzStringResolver::m_logger
ILogger & m_logger
Definition: BittyBuzzStringResolver.h:21
BittyBuzzStringResolver::m_stringIdOffset
const uint16_t m_stringIdOffset
Definition: BittyBuzzStringResolver.h:24
ILogger.h