SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
dmxpp::Value Namespace Reference

Classes

struct  Color
 
struct  Element
 
struct  Invalid
 
struct  Time
 

Typedefs

using ByteArray = std::vector< std::byte >
 
using Vector2 = sourcepp::math::Vec2f
 
using Vector3 = sourcepp::math::Vec3f
 
using Vector4 = sourcepp::math::Vec4f
 
using EulerAngles = sourcepp::math::EulerAngles
 
using Quaternion = sourcepp::math::Quat
 
using Matrix4x4 = sourcepp::math::Mat4x4f
 
using 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  ID : uint8_t {
  INVALID = 0 , VALUE_START = 1 , ELEMENT = 1 , INT = 2 ,
  FLOAT = 3 , BOOL = 4 , STRING = 5 , BYTEARRAY = 6 ,
  TIME = 7 , COLOR = 8 , VECTOR2 = 9 , VECTOR3 = 10 ,
  VECTOR4 = 11 , EULER_ANGLE = 12 , QUATERNION = 13 , MATRIX_4X4 = 14 ,
  VALUE_END = 14 , ARRAY_START = 15 , ARRAY_ELEMENT = 15 , ARRAY_INT = 16 ,
  ARRAY_FLOAT = 17 , ARRAY_BOOL = 18 , ARRAY_STRING = 19 , ARRAY_BYTEARRAY = 20 ,
  ARRAY_TIME = 21 , ARRAY_COLOR = 22 , ARRAY_VECTOR2 = 23 , ARRAY_VECTOR3 = 24 ,
  ARRAY_VECTOR4 = 25 , ARRAY_EULER_ANGLE = 26 , ARRAY_QUATERNION = 27 , ARRAY_MATRIX_4X4 = 28 ,
  ARRAY_END = 28
}
 

Functions

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

Typedef Documentation

◆ ByteArray

using dmxpp::Value::ByteArray = typedef std::vector<std::byte>

Definition at line 24 of file Value.h.

◆ EulerAngles

Definition at line 43 of file Value.h.

◆ Generic

using dmxpp::Value::Generic = typedef 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> >

Definition at line 49 of file Value.h.

◆ Matrix4x4

using dmxpp::Value::Matrix4x4 = typedef sourcepp::math::Mat4x4f

Definition at line 47 of file Value.h.

◆ Quaternion

Definition at line 45 of file Value.h.

◆ Vector2

using dmxpp::Value::Vector2 = typedef sourcepp::math::Vec2f

Definition at line 37 of file Value.h.

◆ Vector3

using dmxpp::Value::Vector3 = typedef sourcepp::math::Vec3f

Definition at line 39 of file Value.h.

◆ Vector4

using dmxpp::Value::Vector4 = typedef sourcepp::math::Vec4f

Definition at line 41 of file Value.h.

Enumeration Type Documentation

◆ ID

enum class dmxpp::Value::ID : uint8_t
strong
Enumerator
INVALID 
VALUE_START 
ELEMENT 
INT 
FLOAT 
BOOL 
STRING 
BYTEARRAY 
TIME 
COLOR 
VECTOR2 
VECTOR3 
VECTOR4 
EULER_ANGLE 
QUATERNION 
MATRIX_4X4 
VALUE_END 
ARRAY_START 
ARRAY_ELEMENT 
ARRAY_INT 
ARRAY_FLOAT 
ARRAY_BOOL 
ARRAY_STRING 
ARRAY_BYTEARRAY 
ARRAY_TIME 
ARRAY_COLOR 
ARRAY_VECTOR2 
ARRAY_VECTOR3 
ARRAY_VECTOR4 
ARRAY_EULER_ANGLE 
ARRAY_QUATERNION 
ARRAY_MATRIX_4X4 
ARRAY_END 

Definition at line 82 of file Value.h.

Function Documentation

◆ arrayIDToInnerID()

constexpr ID dmxpp::Value::arrayIDToInnerID ( ID  id)
constexpr

Definition at line 128 of file Value.h.

◆ byteToID()

constexpr ID dmxpp::Value::byteToID ( std::byte  id)
constexpr

Definition at line 124 of file Value.h.

◆ IDToByte()

constexpr std::byte dmxpp::Value::IDToByte ( ID  id)
constexpr

Definition at line 120 of file Value.h.

◆ IDToString()

std::string dmxpp::Value::IDToString ( ID  id)

Definition at line 8 of file Value.cpp.

◆ innerIDToArrayID()

constexpr ID dmxpp::Value::innerIDToArrayID ( ID  id)
constexpr

Definition at line 135 of file Value.h.

◆ stringToID()

constexpr ID dmxpp::Value::stringToID ( std::string_view  id)
constexpr

Definition at line 145 of file Value.h.