Rcpp Version 1.0.9
Rcpp::String Class Reference

#include <String.h>

Public Types

typedef internal::string_proxy< STRSXP > StringProxy
 
typedef internal::const_string_proxy< STRSXP > const_StringProxy
 

Public Member Functions

 String ()
 
 String (const String &s)
 
 String (SEXP charsxp)
 
 String (const StringProxy &proxy)
 
 String (const StringProxy &proxy, cetype_t enc)
 
 String (const const_StringProxy &proxy)
 
 String (const const_StringProxy &proxy, cetype_t enc)
 
 String (const std::string &s, cetype_t enc=CE_UTF8)
 
 String (const std::wstring &s, cetype_t enc=CE_UTF8)
 
 String (const char *s, cetype_t enc=CE_UTF8)
 
 String (const wchar_t *s, cetype_t enc=CE_UTF8)
 
 String (int x)
 
 String (double x)
 
 String (bool x)
 
 String (Rcomplex x)
 
 String (Rbyte x)
 
 ~String ()
 
Stringoperator= (int x)
 
Stringoperator= (double x)
 
Stringoperator= (Rbyte x)
 
Stringoperator= (bool x)
 
Stringoperator= (Rcomplex x)
 
Stringoperator= (SEXP x)
 
Stringoperator= (const StringProxy &proxy)
 
Stringoperator= (const String &other)
 
Stringoperator= (const std::string &s)
 
Stringoperator= (const char *s)
 
Stringoperator= (const std::wstring &s)
 
Stringoperator= (const wchar_t *s)
 
Stringoperator+= (const std::string &s)
 
Stringoperator+= (const char *s)
 
Stringoperator+= (const std::wstring &s)
 
Stringoperator+= (const wchar_t *s)
 
Stringoperator+= (const String &other)
 
Stringoperator+= (const StringProxy &proxy)
 
Stringoperator+= (const const_StringProxy &proxy)
 
Stringoperator+= (SEXP x)
 
Stringreplace_first (const char *s, const char *news)
 
Stringreplace_first (const Rcpp::String &s, const char *news)
 
Stringreplace_first (const char *s, const Rcpp::String &news)
 
Stringreplace_first (const Rcpp::String &s, const Rcpp::String &news)
 
Stringreplace_last (const char *s, const char *news)
 
Stringreplace_last (const Rcpp::String &s, const char *news)
 
Stringreplace_last (const char *s, const Rcpp::String &news)
 
Stringreplace_last (const Rcpp::String &s, const Rcpp::String &news)
 
Stringreplace_all (const char *s, const char *news)
 
template<typename LHS , typename RHS >
Stringreplace_all (const LHS &s, const RHS &news)
 
Stringreplace_all (const Rcpp::String &s, const char *news)
 
Stringreplace_all (const char *s, const Rcpp::String &news)
 
Stringreplace_all (const Rcpp::String &s, const Rcpp::String &news)
 
Stringpush_back (const char *s)
 
Stringpush_back (const std::string &s)
 
Stringpush_back (const Rcpp::String &s)
 
Stringpush_front (const char *s)
 
Stringpush_front (const std::string &s)
 
Stringpush_front (const Rcpp::String &s)
 
void set_na ()
 
SEXP get_sexp_impl () const
 
SEXP get_sexp () const
 
SEXP get_sexp ()
 
 operator std::string () const
 
 operator std::wstring () const
 
const char * get_cstring () const
 
cetype_t get_encoding () const
 
void set_encoding (cetype_t encoding)
 
bool operator< (const Rcpp::String &other) const
 
bool operator== (const Rcpp::String &other) const
 
bool operator!= (const Rcpp::String &other) const
 
bool operator== (const StringProxy &other) const
 
bool operator!= (const StringProxy &other) const
 
bool operator== (const const_StringProxy &other) const
 
bool operator!= (const const_StringProxy &other) const
 
bool operator> (const Rcpp::String &other) const
 
bool operator== (SEXP other) const
 
bool operator!= (SEXP other) const
 

Private Member Functions

template<typename T >
Stringassign_wide_string (const T &s)
 
template<typename T >
Stringappend_wide_string (const T &s)
 
bool is_na () const
 
void setBuffer ()
 
void setData ()
 
template<typename T >
void append (const T &s)
 

Private Attributes

SEXP data
 
SEXP token
 
std::string buffer
 
bool valid
 
bool buffer_ready
 
cetype_t enc
 

Detailed Description

A single string, i.e. an element of a character vector. This represents CHARSXP SEXP

Definition at line 49 of file String.h.

Member Typedef Documentation

◆ const_StringProxy

Definition at line 52 of file String.h.

◆ StringProxy

Definition at line 51 of file String.h.

Constructor & Destructor Documentation

◆ String() [1/16]

Rcpp::String::String ( )
inline

default constructor

Definition at line 55 of file String.h.

References data, Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, and token.

Referenced by replace_all().

Here is the call graph for this function:

◆ String() [2/16]

Rcpp::String::String ( const String s)
inline

copy constructor

Definition at line 61 of file String.h.

References buffer_ready, data, get_sexp(), Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, and token.

Here is the call graph for this function:

◆ String() [3/16]

Rcpp::String::String ( SEXP  charsxp)
inline

construct a string from a single CHARSXP SEXP

Definition at line 70 of file String.h.

References buffer_ready, data, enc, Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, token, and valid.

Here is the call graph for this function:

◆ String() [4/16]

Rcpp::String::String ( const StringProxy proxy)
inline

from string proxy

Definition at line 93 of file String.h.

References data, Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, and token.

Here is the call graph for this function:

◆ String() [5/16]

Rcpp::String::String ( const StringProxy proxy,
cetype_t  enc 
)
inline

Definition at line 98 of file String.h.

References data, enc, Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, set_encoding(), and token.

Here is the call graph for this function:

◆ String() [6/16]

Rcpp::String::String ( const const_StringProxy proxy)
inline

from string proxy

Definition at line 105 of file String.h.

References data, Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, and token.

Here is the call graph for this function:

◆ String() [7/16]

Rcpp::String::String ( const const_StringProxy proxy,
cetype_t  enc 
)
inline

Definition at line 110 of file String.h.

References data, enc, Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, set_encoding(), and token.

Here is the call graph for this function:

◆ String() [8/16]

Rcpp::String::String ( const std::string &  s,
cetype_t  enc = CE_UTF8 
)
inline

from a std::string

Definition at line 117 of file String.h.

References RCPP_STRING_DEBUG.

◆ String() [9/16]

Rcpp::String::String ( const std::wstring &  s,
cetype_t  enc = CE_UTF8 
)
inline

Definition at line 138 of file String.h.

References data, Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, and token.

Here is the call graph for this function:

◆ String() [10/16]

Rcpp::String::String ( const char *  s,
cetype_t  enc = CE_UTF8 
)
inline

from a const char*

Definition at line 144 of file String.h.

References data, RCPP_STRING_DEBUG, and token.

◆ String() [11/16]

Rcpp::String::String ( const wchar_t *  s,
cetype_t  enc = CE_UTF8 
)
inline

Definition at line 150 of file String.h.

References data, Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, and token.

Here is the call graph for this function:

◆ String() [12/16]

Rcpp::String::String ( int  x)
inline

constructors from R primitives

Definition at line 156 of file String.h.

References data, Rcpp::Rcpp_PreciousPreserve(), and token.

Here is the call graph for this function:

◆ String() [13/16]

Rcpp::String::String ( double  x)
inline

Definition at line 159 of file String.h.

References data, Rcpp::Rcpp_PreciousPreserve(), and token.

Here is the call graph for this function:

◆ String() [14/16]

Rcpp::String::String ( bool  x)
inline

Definition at line 162 of file String.h.

References data, Rcpp::Rcpp_PreciousPreserve(), and token.

Here is the call graph for this function:

◆ String() [15/16]

Rcpp::String::String ( Rcomplex  x)
inline

Definition at line 165 of file String.h.

References data, Rcpp::Rcpp_PreciousPreserve(), and token.

Here is the call graph for this function:

◆ String() [16/16]

Rcpp::String::String ( Rbyte  x)
inline

Definition at line 168 of file String.h.

References data, Rcpp::Rcpp_PreciousPreserve(), and token.

Here is the call graph for this function:

◆ ~String()

Rcpp::String::~String ( )
inline

Definition at line 172 of file String.h.

References data, Rcpp::Rcpp_PreciousRelease(), and token.

Here is the call graph for this function:

Member Function Documentation

◆ append()

template<typename T >
void Rcpp::String::append ( const T &  s)
inlineprivate

Definition at line 672 of file String.h.

References buffer.

◆ append_wide_string()

template<typename T >
String& Rcpp::String::append_wide_string ( const T &  s)
inlineprivate

Definition at line 331 of file String.h.

References buffer_ready, data, DEMANGLE, is_na(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), RCPP_STRING_DEBUG_1, setData(), token, and valid.

Referenced by operator+=().

Here is the call graph for this function:

◆ assign_wide_string()

template<typename T >
String& Rcpp::String::assign_wide_string ( const T &  s)
inlineprivate

Definition at line 303 of file String.h.

References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.

Referenced by operator=().

Here is the call graph for this function:

◆ get_cstring()

const char* Rcpp::String::get_cstring ( ) const
inline

◆ get_encoding()

cetype_t Rcpp::String::get_encoding ( ) const
inline

Definition at line 580 of file String.h.

References enc.

◆ get_sexp() [1/2]

SEXP Rcpp::String::get_sexp ( )
inline

Definition at line 562 of file String.h.

References data, RCPP_STRING_DEBUG_1, setData(), and valid.

Here is the call graph for this function:

◆ get_sexp() [2/2]

◆ get_sexp_impl()

SEXP Rcpp::String::get_sexp_impl ( ) const
inline

Definition at line 544 of file String.h.

References buffer, and enc.

Referenced by get_sexp(), set_encoding(), and setData().

◆ is_na()

bool Rcpp::String::is_na ( ) const
inlineprivate

Definition at line 657 of file String.h.

References data.

Referenced by append_wide_string(), operator+=(), push_back(), push_front(), replace_all(), replace_first(), and replace_last().

◆ operator std::string()

Rcpp::String::operator std::string ( ) const
inline

Definition at line 567 of file String.h.

References get_cstring().

Here is the call graph for this function:

◆ operator std::wstring()

Rcpp::String::operator std::wstring ( ) const
inline

Definition at line 571 of file String.h.

References get_cstring().

Here is the call graph for this function:

◆ operator!=() [1/4]

bool Rcpp::String::operator!= ( const const_StringProxy other) const
inline

Definition at line 623 of file String.h.

References Rcpp::internal::const_string_proxy< RTYPE, StoragePolicy >::get(), and get_sexp().

Here is the call graph for this function:

◆ operator!=() [2/4]

bool Rcpp::String::operator!= ( const Rcpp::String other) const
inline

Definition at line 607 of file String.h.

References get_sexp().

Here is the call graph for this function:

◆ operator!=() [3/4]

bool Rcpp::String::operator!= ( const StringProxy other) const
inline

Definition at line 615 of file String.h.

References Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::get(), and get_sexp().

Here is the call graph for this function:

◆ operator!=() [4/4]

bool Rcpp::String::operator!= ( SEXP  other) const
inline

Definition at line 635 of file String.h.

References get_sexp().

Here is the call graph for this function:

◆ operator+=() [1/8]

String& Rcpp::String::operator+= ( const char *  s)
inline

Definition at line 323 of file String.h.

References buffer, is_na(), RCPP_STRING_DEBUG, setBuffer(), and valid.

Here is the call graph for this function:

◆ operator+=() [2/8]

String& Rcpp::String::operator+= ( const const_StringProxy proxy)
inline

Definition at line 380 of file String.h.

References buffer, buffer_ready, data, is_na(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), RCPP_STRING_DEBUG, setBuffer(), token, and valid.

Here is the call graph for this function:

◆ operator+=() [3/8]

String& Rcpp::String::operator+= ( const std::string &  s)
inline

Definition at line 316 of file String.h.

References buffer, is_na(), RCPP_STRING_DEBUG, setBuffer(), and valid.

Here is the call graph for this function:

◆ operator+=() [4/8]

String& Rcpp::String::operator+= ( const std::wstring &  s)
inline

Definition at line 348 of file String.h.

References append_wide_string().

Here is the call graph for this function:

◆ operator+=() [5/8]

String& Rcpp::String::operator+= ( const String other)
inline

Definition at line 351 of file String.h.

References buffer, buffer_ready, data, is_na(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), RCPP_STRING_DEBUG, setBuffer(), token, and valid.

Here is the call graph for this function:

◆ operator+=() [6/8]

String& Rcpp::String::operator+= ( const StringProxy proxy)
inline

Definition at line 365 of file String.h.

References buffer, buffer_ready, data, is_na(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), RCPP_STRING_DEBUG, setBuffer(), token, and valid.

Here is the call graph for this function:

◆ operator+=() [7/8]

String& Rcpp::String::operator+= ( const wchar_t *  s)
inline

Definition at line 349 of file String.h.

References append_wide_string().

Here is the call graph for this function:

◆ operator+=() [8/8]

String& Rcpp::String::operator+= ( SEXP  x)
inline

Definition at line 395 of file String.h.

References buffer, buffer_ready, data, is_na(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), RCPP_STRING_DEBUG, setBuffer(), token, and valid.

Here is the call graph for this function:

◆ operator<()

bool Rcpp::String::operator< ( const Rcpp::String other) const
inline

Definition at line 600 of file String.h.

References get_cstring().

Here is the call graph for this function:

◆ operator=() [1/12]

String& Rcpp::String::operator= ( bool  x)
inline

Definition at line 203 of file String.h.

References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.

Here is the call graph for this function:

◆ operator=() [2/12]

String& Rcpp::String::operator= ( const char *  s)
inline

Definition at line 294 of file String.h.

References buffer, buffer_ready, and valid.

◆ operator=() [3/12]

String& Rcpp::String::operator= ( const std::string &  s)
inline

Definition at line 264 of file String.h.

References buffer, buffer_ready, and valid.

◆ operator=() [4/12]

String& Rcpp::String::operator= ( const std::wstring &  s)
inline

Definition at line 313 of file String.h.

References assign_wide_string().

Here is the call graph for this function:

◆ operator=() [5/12]

String& Rcpp::String::operator= ( const String other)
inline

Definition at line 240 of file String.h.

References buffer, buffer_ready, data, enc, get_sexp(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.

Here is the call graph for this function:

◆ operator=() [6/12]

String& Rcpp::String::operator= ( const StringProxy proxy)
inline

Definition at line 229 of file String.h.

References buffer_ready, data, Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::get(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.

Here is the call graph for this function:

◆ operator=() [7/12]

String& Rcpp::String::operator= ( const wchar_t *  s)
inline

Definition at line 314 of file String.h.

References assign_wide_string().

Here is the call graph for this function:

◆ operator=() [8/12]

String& Rcpp::String::operator= ( double  x)
inline

Definition at line 187 of file String.h.

References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.

Here is the call graph for this function:

◆ operator=() [9/12]

String& Rcpp::String::operator= ( int  x)
inline

Definition at line 179 of file String.h.

References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.

Here is the call graph for this function:

◆ operator=() [10/12]

String& Rcpp::String::operator= ( Rbyte  x)
inline

Definition at line 195 of file String.h.

References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.

Here is the call graph for this function:

◆ operator=() [11/12]

String& Rcpp::String::operator= ( Rcomplex  x)
inline

Definition at line 211 of file String.h.

References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.

Here is the call graph for this function:

◆ operator=() [12/12]

String& Rcpp::String::operator= ( SEXP  x)
inline

Definition at line 219 of file String.h.

References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.

Here is the call graph for this function:

◆ operator==() [1/4]

bool Rcpp::String::operator== ( const const_StringProxy other) const
inline

Definition at line 619 of file String.h.

References Rcpp::internal::const_string_proxy< RTYPE, StoragePolicy >::get(), and get_sexp().

Here is the call graph for this function:

◆ operator==() [2/4]

bool Rcpp::String::operator== ( const Rcpp::String other) const
inline

Definition at line 604 of file String.h.

References get_sexp().

Here is the call graph for this function:

◆ operator==() [3/4]

bool Rcpp::String::operator== ( const StringProxy other) const
inline

Definition at line 611 of file String.h.

References Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::get(), and get_sexp().

Here is the call graph for this function:

◆ operator==() [4/4]

bool Rcpp::String::operator== ( SEXP  other) const
inline

Definition at line 631 of file String.h.

References get_sexp().

Here is the call graph for this function:

◆ operator>()

bool Rcpp::String::operator> ( const Rcpp::String other) const
inline

Definition at line 627 of file String.h.

References get_cstring().

Here is the call graph for this function:

◆ push_back() [1/3]

String& Rcpp::String::push_back ( const char *  s)
inline

Definition at line 506 of file String.h.

References buffer, is_na(), setBuffer(), and valid.

Referenced by push_back().

Here is the call graph for this function:

◆ push_back() [2/3]

String& Rcpp::String::push_back ( const Rcpp::String s)
inline

Definition at line 514 of file String.h.

References get_cstring(), is_na(), push_back(), and set_na().

Here is the call graph for this function:

◆ push_back() [3/3]

String& Rcpp::String::push_back ( const std::string &  s)
inline

Definition at line 511 of file String.h.

References push_back().

Here is the call graph for this function:

◆ push_front() [1/3]

String& Rcpp::String::push_front ( const char *  s)
inline

Definition at line 520 of file String.h.

References buffer, is_na(), setBuffer(), and valid.

Referenced by push_front().

Here is the call graph for this function:

◆ push_front() [2/3]

String& Rcpp::String::push_front ( const Rcpp::String s)
inline

Definition at line 528 of file String.h.

References get_cstring(), is_na(), push_front(), and set_na().

Here is the call graph for this function:

◆ push_front() [3/3]

String& Rcpp::String::push_front ( const std::string &  s)
inline

Definition at line 525 of file String.h.

References push_front().

Here is the call graph for this function:

◆ replace_all() [1/5]

String& Rcpp::String::replace_all ( const char *  s,
const char *  news 
)
inline

Definition at line 469 of file String.h.

References buffer, is_na(), RCPP_STRING_DEBUG_2, setBuffer(), and valid.

Referenced by replace_all().

Here is the call graph for this function:

◆ replace_all() [2/5]

String& Rcpp::String::replace_all ( const char *  s,
const Rcpp::String news 
)
inline

Definition at line 495 of file String.h.

References get_cstring(), is_na(), and replace_all().

Here is the call graph for this function:

◆ replace_all() [3/5]

template<typename LHS , typename RHS >
String& Rcpp::String::replace_all ( const LHS &  s,
const RHS &  news 
)
inline

Definition at line 486 of file String.h.

References replace_all(), and String().

Here is the call graph for this function:

◆ replace_all() [4/5]

String& Rcpp::String::replace_all ( const Rcpp::String s,
const char *  news 
)
inline

Definition at line 490 of file String.h.

References get_cstring(), is_na(), and replace_all().

Here is the call graph for this function:

◆ replace_all() [5/5]

String& Rcpp::String::replace_all ( const Rcpp::String s,
const Rcpp::String news 
)
inline

Definition at line 500 of file String.h.

References get_cstring(), is_na(), and replace_all().

Here is the call graph for this function:

◆ replace_first() [1/4]

String& Rcpp::String::replace_first ( const char *  s,
const char *  news 
)
inline

Definition at line 416 of file String.h.

References buffer, is_na(), RCPP_STRING_DEBUG_2, setBuffer(), and valid.

Referenced by replace_first().

Here is the call graph for this function:

◆ replace_first() [2/4]

String& Rcpp::String::replace_first ( const char *  s,
const Rcpp::String news 
)
inline

Definition at line 431 of file String.h.

References get_cstring(), is_na(), and replace_first().

Here is the call graph for this function:

◆ replace_first() [3/4]

String& Rcpp::String::replace_first ( const Rcpp::String s,
const char *  news 
)
inline

Definition at line 426 of file String.h.

References get_cstring(), is_na(), and replace_first().

Here is the call graph for this function:

◆ replace_first() [4/4]

String& Rcpp::String::replace_first ( const Rcpp::String s,
const Rcpp::String news 
)
inline

Definition at line 436 of file String.h.

References get_cstring(), is_na(), and replace_first().

Here is the call graph for this function:

◆ replace_last() [1/4]

String& Rcpp::String::replace_last ( const char *  s,
const char *  news 
)
inline

Definition at line 442 of file String.h.

References buffer, is_na(), RCPP_STRING_DEBUG_2, setBuffer(), and valid.

Referenced by replace_last().

Here is the call graph for this function:

◆ replace_last() [2/4]

String& Rcpp::String::replace_last ( const char *  s,
const Rcpp::String news 
)
inline

Definition at line 457 of file String.h.

References get_cstring(), is_na(), and replace_last().

Here is the call graph for this function:

◆ replace_last() [3/4]

String& Rcpp::String::replace_last ( const Rcpp::String s,
const char *  news 
)
inline

Definition at line 452 of file String.h.

References get_cstring(), is_na(), and replace_last().

Here is the call graph for this function:

◆ replace_last() [4/4]

String& Rcpp::String::replace_last ( const Rcpp::String s,
const Rcpp::String news 
)
inline

Definition at line 462 of file String.h.

References get_cstring(), is_na(), and replace_last().

Here is the call graph for this function:

◆ set_encoding()

void Rcpp::String::set_encoding ( cetype_t  encoding)
inline

Definition at line 584 of file String.h.

References data, enc, get_sexp_impl(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.

Referenced by String().

Here is the call graph for this function:

◆ set_na()

void Rcpp::String::set_na ( )
inline

Definition at line 535 of file String.h.

References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.

Referenced by push_back(), and push_front().

Here is the call graph for this function:

◆ setBuffer()

void Rcpp::String::setBuffer ( )
inlineprivate

Definition at line 658 of file String.h.

References buffer, buffer_ready, char_nocheck(), and data.

Referenced by operator+=(), push_back(), push_front(), replace_all(), replace_first(), and replace_last().

Here is the call graph for this function:

◆ setData()

void Rcpp::String::setData ( )
inlineprivate

Definition at line 664 of file String.h.

References data, get_sexp_impl(), Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, token, and valid.

Referenced by append_wide_string(), and get_sexp().

Here is the call graph for this function:

Member Data Documentation

◆ buffer

std::string Rcpp::String::buffer
private

a buffer used to do string operations withough going back to the SEXP

Definition at line 646 of file String.h.

Referenced by append(), get_cstring(), get_sexp_impl(), operator+=(), operator=(), push_back(), push_front(), replace_all(), replace_first(), replace_last(), and setBuffer().

◆ buffer_ready

bool Rcpp::String::buffer_ready
private

is the buffer initialized

Definition at line 652 of file String.h.

Referenced by append_wide_string(), assign_wide_string(), get_cstring(), operator+=(), operator=(), set_na(), setBuffer(), and String().

◆ data

SEXP Rcpp::String::data
private

◆ enc

cetype_t Rcpp::String::enc
private

the encoding of encapsulated CHARSXP

Definition at line 655 of file String.h.

Referenced by get_encoding(), get_sexp_impl(), operator=(), set_encoding(), and String().

◆ token

SEXP Rcpp::String::token
private

◆ valid

bool Rcpp::String::valid
private

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