rds2cpp
C++ library for parsing RDS files
|
Pairlist, i.e., a linked list. More...
#include <RObject.hpp>
Public Member Functions | |
SEXPType | type () const |
void | add (std::string t, std::unique_ptr< RObject > d, StringEncoding enc=StringEncoding::UTF8) |
void | add (std::string t, RObject *d, StringEncoding enc=StringEncoding::UTF8) |
void | add (std::unique_ptr< RObject > d) |
void | add (RObject *d) |
![]() |
Public Attributes | |
std::vector< std::unique_ptr< RObject > > | data |
std::vector< unsigned char > | has_tag |
std::vector< std::string > | tag_names |
std::vector< StringEncoding > | tag_encodings |
Attributes | attributes |
Pairlist, i.e., a linked list.
|
inline |
A convenient helper to add an untagged element to the end of the pairlist.
d | Pointer to the element value. This should not be owned by any other resource. |
|
inline |
A convenient helper to add a tagged element to the end of the pairlist.
t | Tag name. |
d | Pointer to the element value. This should not be owned by any other resource. |
enc | Encoding of the tag name. |
|
inline |
A convenient helper to add a tagged element to the end of the pairlist.
t | Tag name. |
d | Unique pointer to the element value. |
enc | Encoding of the tag name. |
|
inline |
A convenient helper to add an untagged element to the end of the pairlist.
d | Pointer to the element value. |
|
inlinevirtual |
Implements rds2cpp::RObject.
Attributes rds2cpp::PairList::attributes |
Additional attributes.
std::vector<std::unique_ptr<RObject> > rds2cpp::PairList::data |
Contents of the vector.
std::vector<unsigned char> rds2cpp::PairList::has_tag |
Whether or not the corresponding element of data
is tagged. This is of length equal to data
.
std::vector<StringEncoding> rds2cpp::PairList::tag_encodings |
Encoding of the tags.
std::vector<std::string> rds2cpp::PairList::tag_names |
Names of the tags. Empty strings are used for untagged elements.