rds2cpp
C++ library for parsing RDS files
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
rds2cpp::Environment Struct Reference

An R environment. More...

#include <Environment.hpp>

Collaboration diagram for rds2cpp::Environment:
Collaboration graph
[legend]

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

bool locked = false
 
bool hashed = false
 
SEXPType parent_type = SEXPType::GLOBALENV_
 
size_t parent = -1
 
std::vector< std::string > variable_names
 
std::vector< StringEncodingvariable_encodings
 
std::vector< std::unique_ptr< RObject > > variable_values
 
Attributes attributes
 

Detailed Description

An R environment.

Member Function Documentation

◆ add() [1/2]

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

A convenient helper to add a variable.

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

◆ add() [2/2]

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

A convenient helper to add a variable.

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

Member Data Documentation

◆ attributes

Attributes rds2cpp::Environment::attributes

Additional attributes.

◆ hashed

bool rds2cpp::Environment::hashed = false

Whether the environment was hashed.

◆ locked

bool rds2cpp::Environment::locked = false

Whether the environment was locked.

◆ parent

size_t rds2cpp::Environment::parent = -1

Index of the parent environment. This should only be used if parent_type is SEXPType::ENV.

◆ parent_type

SEXPType rds2cpp::Environment::parent_type = SEXPType::GLOBALENV_

Type of the parent environment. This is usually one of SEXPType::ENV, SEXPType::GLOBALENV_, SEXPType::BASEENV_ or SEXPType::EMPTYENV_.

◆ variable_encodings

std::vector<StringEncoding> rds2cpp::Environment::variable_encodings

Encodings of the variable names in variable_names.

◆ variable_names

std::vector<std::string> rds2cpp::Environment::variable_names

Names of the variables inside this environment.

◆ variable_values

std::vector<std::unique_ptr<RObject> > rds2cpp::Environment::variable_values

Values of the variables in this environment.


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