CXXR (C++ R)
Namespaces | Typedefs | Functions
StringVector.h File Reference

($Id: StringVector.h 1351 2013-03-08 15:12:28Z arr $)

Class CXXR::StringVector and associated C interface. More...

#include "CXXR/String.h"
#include <iostream>
#include "CXXR/FixedVector.hpp"
#include "CXXR/SEXP_downcast.hpp"
Include dependency graph for StringVector.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  CXXR
 Namespace for the CXXR project.
namespace  CXXR::ElementTraits
 Namespace encapsulating traits of R vector element types.

Typedefs

typedef FixedVector< RHandle
< String >, STRSXP
CXXR::StringVector
 Vector of strings.

Functions

StringVectorCXXR::asStringVector (const std::string &str, cetype_t encoding=CE_NATIVE)
 Create a StringVector containing a single std::string.
void CXXR::strdump (std::ostream &os, const StringVector &sv, std::size_t margin=0)
 (For debugging.)
Rboolean Rf_isString (SEXP s)
void SET_STRING_ELT (SEXP x, int i, SEXP v)
 Set element of CXXR::StringVector.
SEXP STRING_ELT (SEXP x, int i)
 Examine element of a CXXR::StringVector.

Detailed Description

Class CXXR::StringVector and associated C interface.

(StringVector implements STRSXP.)


Function Documentation

Rboolean Rf_isString ( SEXP  s)
inline
Parameters:
sPointer to an RObject.
Returns:
TRUE iff the RObject pointed to by s is a vector of strings.
void SET_STRING_ELT ( SEXP  x,
int  i,
SEXP  v 
)

Set element of CXXR::StringVector.

Parameters:
xNon-null pointer to a CXXR::StringVector .
iIndex of the required element. There is no bounds checking.
vNon-null pointer to CXXR::String representing the new value.
SEXP STRING_ELT ( SEXP  x,
int  i 
)
inline

Examine element of a CXXR::StringVector.

Parameters:
xNon-null pointer to a CXXR::StringVector. An error is raised if x is not a pointer to a CXXR::StringVector.
iIndex of the required element. There is no bounds checking.
Returns:
Pointer to extracted i 'th element.