15 #include <vsg/core/Object.h>
17 #include <vsg/io/Input.h>
18 #include <vsg/io/ObjectFactory.h>
19 #include <vsg/io/Options.h>
31 using ObjectID = uint32_t;
37 using OptionalObjectID = std::pair<bool, ObjectID>;
39 OptionalObjectID objectID();
42 void _read(
size_t num, T* value)
50 for (; num > 0; --num, ++value)
57 template<
typename R,
typename T>
58 void _read_withcast(
size_t num, T* value)
64 *value =
static_cast<T
>(v);
69 for (; num > 0; --num, ++value)
72 *value =
static_cast<T
>(v);
78 void read(
size_t num, int8_t* value)
override { _read_withcast<int16_t>(num, value); }
79 void read(
size_t num, uint8_t* value)
override { _read_withcast<uint16_t>(num, value); }
80 void read(
size_t num, int16_t* value)
override { _read(num, value); }
81 void read(
size_t num, uint16_t* value)
override { _read(num, value); }
82 void read(
size_t num, int32_t* value)
override { _read(num, value); }
83 void read(
size_t num, uint32_t* value)
override { _read(num, value); }
84 void read(
size_t num, int64_t* value)
override { _read(num, value); }
85 void read(
size_t num, uint64_t* value)
override { _read(num, value); }
86 void read(
size_t num,
float* value)
override { _read(num, value); }
87 void read(
size_t num,
double* value)
override { _read(num, value); }
90 void _read(std::string& value);
93 void _read(std::wstring& value);
96 void read(
size_t num, std::string* value)
override;
99 void read(
size_t num, std::wstring* value)
override;
108 std::istream& _input;
110 std::string _readPropertyName;