2024-05-01 10:39:18 +02:00
|
|
|
#include <elna/source/types.hpp>
|
|
|
|
|
|
|
|
namespace elna::source
|
|
|
|
{
|
|
|
|
type::type(const std::size_t byte_size)
|
|
|
|
: byte_size(byte_size)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-05-16 21:01:11 +02:00
|
|
|
std::size_t type::size() const noexcept
|
|
|
|
{
|
|
|
|
return this->byte_size;
|
|
|
|
}
|
|
|
|
|
2024-05-01 10:39:18 +02:00
|
|
|
primitive_type::primitive_type(const std::string& type_name, const std::size_t byte_size)
|
|
|
|
: type(byte_size), type_name(type_name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
pointer_type::pointer_type(std::shared_ptr<const type> base_type, const std::size_t byte_size)
|
|
|
|
: type(byte_size), base_type(base_type)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|