rds2cpp
C++ library for parsing RDS files
Loading...
Searching...
No Matches
rds2cpp::Attributes Struct Reference

Attribute names and values. More...

#include <RObject.hpp>

Public Member Functions

void add (std::string n, RObject *v, StringEncoding enc=StringEncoding::UTF8)
 
void add (std::string n, std::unique_ptr< RObject > v, StringEncoding enc=StringEncoding::UTF8)
 

Public Attributes

std::vector< std::string > names
 
std::vector< StringEncodingencodings
 
std::vector< std::unique_ptr< RObject > > values
 

Detailed Description

Attribute names and values.

Member Function Documentation

◆ add() [1/2]

void rds2cpp::Attributes::add ( std::string n,
RObject * v,
StringEncoding enc = StringEncoding::UTF8 )
inline

A convenient helper to add an attribute.

Parameters
nName of the attribute.
vPointer to the attribute value. This should not be owned by any other object.
encEncoding of the attribute name.

◆ add() [2/2]

void rds2cpp::Attributes::add ( std::string n,
std::unique_ptr< RObject > v,
StringEncoding enc = StringEncoding::UTF8 )
inline

A convenient helper to add an attribute.

Parameters
nName of the attribute.
vUnique pointer to the attribute value.
encEncoding of the attribute name.

Member Data Documentation

◆ encodings

std::vector<StringEncoding> rds2cpp::Attributes::encodings

Encoding of each attribute's name.

◆ names

std::vector<std::string> rds2cpp::Attributes::names

Name of each attribute.

◆ values

std::vector<std::unique_ptr<RObject> > rds2cpp::Attributes::values

Value of each attribute.


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