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

Language object, i.e., a function call. More...

#include <RObject.hpp>

Inheritance diagram for rds2cpp::LanguageObject:
Collaboration diagram for rds2cpp::LanguageObject:

Public Member Functions

SEXPType type () const
 
void add_argument (std::string n, RObject *d, StringEncoding enc=StringEncoding::UTF8)
 
void add_argument (std::string n, std::unique_ptr< RObject > d, StringEncoding enc=StringEncoding::UTF8)
 
void add_argument (RObject *d)
 
void add_argument (std::unique_ptr< RObject > d)
 
- Public Member Functions inherited from rds2cpp::RObject

Public Attributes

std::string function_name
 
StringEncoding function_encoding = StringEncoding::UTF8
 
std::vector< std::unique_ptr< RObject > > argument_values
 
std::vector< std::string > argument_names
 
std::vector< unsigned char > argument_has_name
 
std::vector< StringEncodingargument_encodings
 
Attributes attributes
 

Detailed Description

Language object, i.e., a function call.

Member Function Documentation

◆ add_argument() [1/4]

void rds2cpp::LanguageObject::add_argument ( RObject * d)
inline

A convenient helper to add an unnamed argument to the end of the argument list.

Parameters
dPointer to the argument value. This should not be owned by any other resource.

◆ add_argument() [2/4]

void rds2cpp::LanguageObject::add_argument ( std::string n,
RObject * d,
StringEncoding enc = StringEncoding::UTF8 )
inline

A convenient helper to add a named argument to the end of the argument list.

Parameters
nArgument name.
dUnique pointer to the argument value. This should not be owned by any other resource.
encEncoding of the argument name.

◆ add_argument() [3/4]

void rds2cpp::LanguageObject::add_argument ( std::string n,
std::unique_ptr< RObject > d,
StringEncoding enc = StringEncoding::UTF8 )
inline

A convenient helper to add a named argument to the end of the argument list.

Parameters
nArgument name.
dUnique pointer to the argument value.
encEncoding of the argument name.

◆ add_argument() [4/4]

void rds2cpp::LanguageObject::add_argument ( std::unique_ptr< RObject > d)
inline

A convenient helper to add an unnamed argument to the end of the argument list.

Parameters
dPointer to the argument value.

◆ type()

SEXPType rds2cpp::LanguageObject::type ( ) const
inlinevirtual
Returns
Type of the R object.

Implements rds2cpp::RObject.

Member Data Documentation

◆ argument_encodings

std::vector<StringEncoding> rds2cpp::LanguageObject::argument_encodings

Encoding of the argument name, if the corresponding entry of argument_names is true. This should have the same length as argument_values.

◆ argument_has_name

std::vector<unsigned char> rds2cpp::LanguageObject::argument_has_name

The name of the argument, if the corresponding entry of argument_names is true. This should have the same length as argument_values.

◆ argument_names

std::vector<std::string> rds2cpp::LanguageObject::argument_names

Whether or not each argument is named. This should have the same length as argument_values.

◆ argument_values

std::vector<std::unique_ptr<RObject> > rds2cpp::LanguageObject::argument_values

Values of the arguments to the function, typically LanguageObject or SymbolIndex objects. These may also be AtomicVector instances of length 1.

◆ attributes

Attributes rds2cpp::LanguageObject::attributes

Additional attributes.

◆ function_encoding

StringEncoding rds2cpp::LanguageObject::function_encoding = StringEncoding::UTF8

Encoding for the function name.

◆ function_name

std::string rds2cpp::LanguageObject::function_name

Name of the function.


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