SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
Value.h File Reference
#include <array>
#include <cstddef>
#include <cstdint>
#include <string>
#include <string_view>
#include <variant>
#include <vector>
#include <sourcepp/Math.h>
Include dependency graph for Value.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dmxpp::Value::Invalid
 
struct  dmxpp::Value::Element
 
struct  dmxpp::Value::Time
 
struct  dmxpp::Value::Color
 
struct  dmxpp::DMXAttribute
 
struct  dmxpp::DMXElement
 

Namespaces

namespace  dmxpp
 
namespace  dmxpp::Value
 

Typedefs

using dmxpp::Value::ByteArray = std::vector< std::byte >
 
using dmxpp::Value::Vector2 = sourcepp::math::Vec2f
 
using dmxpp::Value::Vector3 = sourcepp::math::Vec3f
 
using dmxpp::Value::Vector4 = sourcepp::math::Vec4f
 
using dmxpp::Value::EulerAngles = sourcepp::math::EulerAngles
 
using dmxpp::Value::Quaternion = sourcepp::math::Quat
 
using dmxpp::Value::Matrix4x4 = sourcepp::math::Mat4x4f
 
using dmxpp::Value::Generic = std::variant< Invalid, Element, int32_t, float, bool, std::string, std::vector< std::byte >, Time, Color, Vector2, Vector3, Vector4, Matrix4x4, std::vector< Element >, std::vector< int32_t >, std::vector< float >, std::vector< bool >, std::vector< std::string >, std::vector< std::vector< std::byte > >, std::vector< Time >, std::vector< Color >, std::vector< Vector2 >, std::vector< Vector3 >, std::vector< Vector4 >, std::vector< Matrix4x4 > >
 

Enumerations

enum class  dmxpp::Value::ID : uint8_t {
  dmxpp::Value::INVALID = 0 , dmxpp::Value::VALUE_START = 1 , dmxpp::Value::ELEMENT = 1 , dmxpp::Value::INT = 2 ,
  dmxpp::Value::FLOAT = 3 , dmxpp::Value::BOOL = 4 , dmxpp::Value::STRING = 5 , dmxpp::Value::BYTEARRAY = 6 ,
  dmxpp::Value::TIME = 7 , dmxpp::Value::COLOR = 8 , dmxpp::Value::VECTOR2 = 9 , dmxpp::Value::VECTOR3 = 10 ,
  dmxpp::Value::VECTOR4 = 11 , dmxpp::Value::EULER_ANGLE = 12 , dmxpp::Value::QUATERNION = 13 , dmxpp::Value::MATRIX_4X4 = 14 ,
  dmxpp::Value::VALUE_END = 14 , dmxpp::Value::ARRAY_START = 15 , dmxpp::Value::ARRAY_ELEMENT = 15 , dmxpp::Value::ARRAY_INT = 16 ,
  dmxpp::Value::ARRAY_FLOAT = 17 , dmxpp::Value::ARRAY_BOOL = 18 , dmxpp::Value::ARRAY_STRING = 19 , dmxpp::Value::ARRAY_BYTEARRAY = 20 ,
  dmxpp::Value::ARRAY_TIME = 21 , dmxpp::Value::ARRAY_COLOR = 22 , dmxpp::Value::ARRAY_VECTOR2 = 23 , dmxpp::Value::ARRAY_VECTOR3 = 24 ,
  dmxpp::Value::ARRAY_VECTOR4 = 25 , dmxpp::Value::ARRAY_EULER_ANGLE = 26 , dmxpp::Value::ARRAY_QUATERNION = 27 , dmxpp::Value::ARRAY_MATRIX_4X4 = 28 ,
  dmxpp::Value::ARRAY_END = 28
}
 

Functions

constexpr std::byte dmxpp::Value::IDToByte (ID id)
 
constexpr ID dmxpp::Value::byteToID (std::byte id)
 
constexpr ID dmxpp::Value::arrayIDToInnerID (ID id)
 
constexpr ID dmxpp::Value::innerIDToArrayID (ID id)
 
std::string dmxpp::Value::IDToString (ID id)
 
constexpr ID dmxpp::Value::stringToID (std::string_view id)