2020-09-05 20:41:58 -07:00
|
|
|
#ifndef POLSERVER_CASEJUMPDATABLOCK_H
|
|
|
|
|
#define POLSERVER_CASEJUMPDATABLOCK_H
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
|
|
|
{
|
|
|
|
|
class CaseJumpDataBlock
|
|
|
|
|
{
|
|
|
|
|
public:
|
2024-01-20 12:38:25 +08:00
|
|
|
void on_boolean_value_jump_to( bool value, uint16_t address );
|
2020-09-05 20:41:58 -07:00
|
|
|
void on_integer_value_jump_to( int32_t value, uint16_t address );
|
|
|
|
|
void on_string_value_jump_to( const std::string& value, uint16_t address );
|
2024-01-20 12:38:25 +08:00
|
|
|
void on_uninitialized_value_jump_to( uint16_t address );
|
2020-09-05 20:41:58 -07:00
|
|
|
void on_default_jump_to( uint16_t address );
|
|
|
|
|
|
2020-12-01 02:23:03 -08:00
|
|
|
[[nodiscard]] const std::vector<std::byte>& get_data() const;
|
2020-09-05 20:41:58 -07:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::vector<std::byte> data;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Pol::Bscript::Compiler
|
|
|
|
|
|
|
|
|
|
#endif // POLSERVER_CASEJUMPDATABLOCK_H
|