vsg: vsg::Input Class Reference

vsg 1.1.9 VulkanSceneGraph library |

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
vsg::Input Class Referenceabstract

`#include <Input.h>`

Inheritance diagram for vsg::Input:
[legend]
Collaboration diagram for vsg::Input:
[legend]

## Public Types
using | ObjectID = uint32_t
using | ObjectIDMap = std::map<ObjectID, ref_ptr<Object>>

## Public Member Functions
| Input (ref_ptr< ObjectFactory > in_objectFactory, ref_ptr< const Options > in_options={})
Input & | operator= (const Input &rhs)=delete
virtual bool | matchPropertyName (const char *propertyName)=0
| return true if property name matches the next token in the stream, or if property names are not required for format
virtual void | read (size_t num, int8_t *value)=0
virtual void | read (size_t num, uint8_t *value)=0
virtual void | read (size_t num, int16_t *value)=0
virtual void | read (size_t num, uint16_t *value)=0
virtual void | read (size_t num, int32_t *value)=0
virtual void | read (size_t num, uint32_t *value)=0
virtual void | read (size_t num, int64_t *value)=0
virtual void | read (size_t num, uint64_t *value)=0
virtual void | read (size_t num, float *value)=0
virtual void | read (size_t num, double *value)=0
virtual void | read (size_t num, long double *value)=0
virtual void | read (size_t num, std::string *value)=0
virtual void | read (size_t num, std::wstring *value)=0
virtual void | read (size_t num, Path *value)=0
virtual ref_ptr< Object > | read ()=0
void | read (size_t num, char *value)
void | read (size_t num, bool *value)
void | read (size_t num, vec2 *value)
void | read (size_t num, vec3 *value)
void | read (size_t num, vec4 *value)
void | read (size_t num, dvec2 *value)
void | read (size_t num, dvec3 *value)
void | read (size_t num, ldvec4 *value)
void | read (size_t num, ldvec2 *value)
void | read (size_t num, ldvec3 *value)
void | read (size_t num, dvec4 *value)
void | read (size_t num, bvec2 *value)
void | read (size_t num, bvec3 *value)
void | read (size_t num, bvec4 *value)
void | read (size_t num, ubvec2 *value)
void | read (size_t num, ubvec3 *value)
void | read (size_t num, ubvec4 *value)
void | read (size_t num, svec2 *value)
void | read (size_t num, svec3 *value)
void | read (size_t num, svec4 *value)
void | read (size_t num, usvec2 *value)
void | read (size_t num, usvec3 *value)
void | read (size_t num, usvec4 *value)
void | read (size_t num, ivec2 *value)
void | read (size_t num, ivec3 *value)
void | read (size_t num, ivec4 *value)
void | read (size_t num, uivec2 *value)
void | read (size_t num, uivec3 *value)
void | read (size_t num, uivec4 *value)
void | read (size_t num, quat *value)
void | read (size_t num, dquat *value)
void | read (size_t num, mat3 *value)
void | read (size_t num, dmat3 *value)
void | read (size_t num, mat4 *value)
void | read (size_t num, dmat4 *value)
void | read (size_t num, sphere *value)
void | read (size_t num, dsphere *value)
void | read (size_t num, box *value)
void | read (size_t num, dbox *value)
void | read (size_t num, plane *value)
void | read (size_t num, dplane *value)
template<typename T>
void | read (size_t num, T *value)
| treat non standard type as raw data
template<typename T>
void | read (const char *propertyName, ref_ptr< T > &arg)
template<typename T>
void | readObjects (const char *propertyName, T &values)
template<typename T>
void | readValues (const char *propertyName, std::vector< T > &values)
template<typename T>
void | readValues (const char *propertyName, std::set< T > &values)
template<typename... Args>
void | read (const char *propertyName, Args &... args)
| match property name and read value(s)
ref_ptr< Object > | readObject (const char *propertyName)
| read object of a particular type
template<class T>
ref_ptr< T > | readObject (const char *propertyName)
| read object of a particular type
template<class T>
void | readObject (const char *propertyName, ref_ptr< T > &arg)
| read object of a particular type
template<typename T>
T | readValue (const char *propertyName)
| read a value of particular type
template<typename W, typename T>
void | readValue (const char *propertyName, T &value)
| read a value as a type, then cast it to another type
virtual bool | version_less (uint32_t major, uint32_t minor, uint32_t patch, uint32_t soversion=0) const
virtual bool | version_greater_equal (uint32_t major, uint32_t minor, uint32_t patch, uint32_t soversion=0) const
template<>
void | readObject (const char *propertyName, ref_ptr< Object > &arg)

## Public Attributes
ObjectIDMap | objectIDMap
ref_ptr< ObjectFactory > | objectFactory
ref_ptr< const Options > | options
Path | filename
VsgVersion | version

## Detailed Description

Base class that provides a means of reading a range of data types from an input stream. Used by vsg::Object::read(Input&) implementations across the VSG to provide native serialization from binary/ascii files

## Member Function Documentation

## ◆ matchPropertyName()

virtual bool vsg::Input::matchPropertyName | ( | const char * | propertyName | ) |
| pure virtual

return true if property name matches the next token in the stream, or if property names are not required for format

Implemented in vsg::AsciiInput, and vsg::BinaryInput.

## ◆ read() [1/4]

virtual ref_ptr< Object > vsg::Input::read | ( |  | ) |
| pure virtual

Implemented in vsg::AsciiInput, and vsg::BinaryInput.

## ◆ read() [2/4]

virtual void vsg::Input::read | ( | size_t | num,
|  | Path * | value )
| pure virtual

Implemented in vsg::AsciiInput, and vsg::BinaryInput.

## ◆ read() [3/4]

virtual void vsg::Input::read | ( | size_t | num,
|  | std::string * | value )
| pure virtual

Implemented in vsg::AsciiInput, and vsg::BinaryInput.

## ◆ read() [4/4]

virtual void vsg::Input::read | ( | size_t | num,
|  | std::wstring * | value )
| pure virtual

Implemented in vsg::AsciiInput, and vsg::BinaryInput.

The documentation for this class was generated from the following file:

- include/vsg/io/Input.h