2018-08-28 04:16:52 -03:00
|
|
|
/* This file is part of the sirit project.
|
2019-07-14 18:48:59 -03:00
|
|
|
* Copyright (c) 2019 sirit
|
|
|
|
|
* This software may be used and distributed according to the terms of the
|
|
|
|
|
* 3-Clause BSD License
|
2018-08-28 04:16:52 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2019-03-11 03:26:21 -03:00
|
|
|
#include <string>
|
2018-08-28 04:16:52 -03:00
|
|
|
#include "operand.h"
|
2018-10-03 00:32:45 -03:00
|
|
|
#include "stream.h"
|
2018-08-28 04:16:52 -03:00
|
|
|
|
|
|
|
|
namespace Sirit {
|
|
|
|
|
|
2019-11-01 06:07:53 -03:00
|
|
|
class LiteralString final : public Operand {
|
2019-03-11 03:26:21 -03:00
|
|
|
public:
|
2019-03-14 02:52:54 -04:00
|
|
|
LiteralString(std::string string);
|
2019-03-14 02:25:57 -04:00
|
|
|
~LiteralString() override;
|
2018-08-28 04:16:52 -03:00
|
|
|
|
2019-03-14 02:25:57 -04:00
|
|
|
void Fetch(Stream& stream) const override;
|
2018-08-28 04:16:52 -03:00
|
|
|
|
2019-11-27 05:25:27 -03:00
|
|
|
std::size_t GetWordCount() const noexcept override;
|
2019-11-01 06:07:53 -03:00
|
|
|
|
2020-07-29 05:46:50 -03:00
|
|
|
bool Equal(const Operand& other) const noexcept override;
|
2018-08-28 04:16:52 -03:00
|
|
|
|
2019-03-11 03:26:21 -03:00
|
|
|
private:
|
2019-11-01 06:07:53 -03:00
|
|
|
std::string string;
|
2018-08-28 04:16:52 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Sirit
|