PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
name.h
1#pragma once
2
3#include "pixelbullet/serialization/node.h"
4
5#include <string>
6#include <utility>
7
8namespace pixelbullet
9{
10struct Name
11{
12 std::string value = "entity";
13
14 Name() = default;
15
16 explicit Name(std::string value)
17 : value(std::move(value))
18 {
19 }
20};
21
22inline Node& operator<<(Node& node, const Name& name)
23{
24 node["value"] << name.value;
25 return node;
26}
27
28inline const Node& operator>>(const Node& node, Name& name)
29{
30 node["value"] >> name.value;
31 return node;
32}
33} // namespace pixelbullet
Represents a hierarchical node capable of storing various data types and supporting YAML serializatio...
Definition node.h:45
Definition name.h:11