rds2cpp
Read and write RDS/RDA files in C++
Loading...
Searching...
No Matches
rds2cpp::EnvironmentIndex Struct Referencefinal

Reference to an environment. More...

#include <RObject.hpp>

Inheritance diagram for rds2cpp::EnvironmentIndex:
Collaboration diagram for rds2cpp::EnvironmentIndex:

Public Member Functions

 EnvironmentIndex ()=default
 
 EnvironmentIndex (SEXPType e)
 
 EnvironmentIndex (std::size_t i)
 
SEXPType type () const
 
- Public Member Functions inherited from rds2cpp::RObject

Public Attributes

std::size_t index = -1
 
SEXPType env_type = SEXPType::GLOBALENV_
 

Detailed Description

Reference to an environment.

Constructor & Destructor Documentation

◆ EnvironmentIndex() [1/3]

rds2cpp::EnvironmentIndex::EnvironmentIndex ( )
default

Default constructor.

◆ EnvironmentIndex() [2/3]

rds2cpp::EnvironmentIndex::EnvironmentIndex ( SEXPType e)
inline
Parameters
eType of the environment, typically one of the special environments (global, empty or base) rather than SEXPType::ENV.

◆ EnvironmentIndex() [3/3]

rds2cpp::EnvironmentIndex::EnvironmentIndex ( std::size_t i)
inline

Create an EnvironmentIndex that refers to a non-global environment, i.e., is of type SEXPType::ENV.

Parameters
iValue of the environment index.

Member Function Documentation

◆ type()

SEXPType rds2cpp::EnvironmentIndex::type ( ) const
inlinevirtual

Type of environment. Most environments will be ENV but special environments can be constructed like SEXPType::GLOBALENV_.

Implements rds2cpp::RObject.

Member Data Documentation

◆ env_type

SEXPType rds2cpp::EnvironmentIndex::env_type = SEXPType::GLOBALENV_

Type of the environment, as returned by type().

◆ index

std::size_t rds2cpp::EnvironmentIndex::index = -1

Index of the RdsFile::external_pointers or RdaFile::external_pointers vector, containing information about this environment. Only used if type() returns ENV.


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