Rcpp Version 0.12.14
Rcpp::internal::string_proxy< RTYPE > Class Template Reference

#include <00_forward_proxy.h>

Collaboration diagram for Rcpp::internal::string_proxy< RTYPE >:

Public Types

typedef ::Rcpp::Vector< RTYPE > VECTOR
 
typedef const char * iterator
 
typedef const char & reference
 

Public Member Functions

 string_proxy ()
 
 string_proxy (VECTOR &v, R_xlen_t index_)
 
 string_proxy (const string_proxy &other)
 
string_proxyoperator= (const string_proxy &other)
 
string_proxyoperator= (const const_string_proxy< RTYPE > &other)
 
string_proxyoperator= (const String &s)
 
template<typename T >
string_proxyoperator= (const std::basic_string< T > &rhs)
 
string_proxyoperator= (const char *rhs)
 
string_proxyoperator= (const wchar_t *rhs)
 
string_proxyoperator= (SEXP rhs)
 
void import (const string_proxy &other)
 
template<typename T >
string_proxyoperator+= (const T &rhs)
 
 operator SEXP () const
 
 operator char * () const
 
void swap (string_proxy &other)
 
void move (R_xlen_t n)
 
SEXP get () const
 
template<typename T >
void set (const T &x)
 
void set (SEXP x)
 
iterator begin () const
 
iterator end () const
 
R_xlen_t size () const
 
bool empty () const
 
reference operator[] (R_xlen_t n)
 
template<typename UnaryOperator >
void transform (UnaryOperator op)
 
template<typename OutputIterator , typename UnaryOperator >
void apply (OutputIterator target, UnaryOperator op)
 
template<typename UnaryOperator >
void apply (UnaryOperator op)
 
bool operator== (const char *other)
 
bool operator!= (const char *other)
 
bool operator== (const string_proxy &other)
 
bool operator!= (const string_proxy &other)
 
bool operator== (SEXP other) const
 
bool operator!= (SEXP other) const
 
template<typename T >
string_proxy< RTYPE > & operator+= (const T &rhs)
 

Public Attributes

VECTORparent
 
R_xlen_t index
 

Static Private Attributes

static std::string buffer
 

Friends

template<int RT>
std::ostream & operator<< (std::ostream &os, const string_proxy< RT > &proxy)
 
template<int RT>
std::string operator+ (const std::string &x, const string_proxy< RT > &proxy)
 

Detailed Description

template<int RTYPE>
class Rcpp::internal::string_proxy< RTYPE >

Definition at line 28 of file 00_forward_proxy.h.

Member Typedef Documentation

◆ iterator

template<int RTYPE>
typedef const char* Rcpp::internal::string_proxy< RTYPE >::iterator

Definition at line 32 of file string_proxy.h.

◆ reference

template<int RTYPE>
typedef const char& Rcpp::internal::string_proxy< RTYPE >::reference

Definition at line 33 of file string_proxy.h.

◆ VECTOR

template<int RTYPE>
typedef ::Rcpp::Vector<RTYPE> Rcpp::internal::string_proxy< RTYPE >::VECTOR

Definition at line 31 of file string_proxy.h.

Constructor & Destructor Documentation

◆ string_proxy() [1/3]

template<int RTYPE>
Rcpp::internal::string_proxy< RTYPE >::string_proxy ( )
inline

Definition at line 35 of file string_proxy.h.

◆ string_proxy() [2/3]

template<int RTYPE>
Rcpp::internal::string_proxy< RTYPE >::string_proxy ( VECTOR v,
R_xlen_t  index_ 
)
inline

Creates a proxy

Parameters
vreference to the associated character vector
indexindex

Definition at line 43 of file string_proxy.h.

◆ string_proxy() [3/3]

template<int RTYPE>
Rcpp::internal::string_proxy< RTYPE >::string_proxy ( const string_proxy< RTYPE > &  other)
inline

Definition at line 45 of file string_proxy.h.

Member Function Documentation

◆ apply() [1/2]

template<int RTYPE>
template<typename OutputIterator , typename UnaryOperator >
void Rcpp::internal::string_proxy< RTYPE >::apply ( OutputIterator  target,
UnaryOperator  op 
)
inline

Definition at line 172 of file string_proxy.h.

References Rcpp::internal::string_proxy< RTYPE >::begin(), and Rcpp::internal::string_proxy< RTYPE >::end().

Here is the call graph for this function:

◆ apply() [2/2]

template<int RTYPE>
template<typename UnaryOperator >
void Rcpp::internal::string_proxy< RTYPE >::apply ( UnaryOperator  op)
inline

Definition at line 177 of file string_proxy.h.

References Rcpp::internal::string_proxy< RTYPE >::begin(), and Rcpp::internal::string_proxy< RTYPE >::end().

Here is the call graph for this function:

◆ begin()

◆ empty()

template<int RTYPE>
bool Rcpp::internal::string_proxy< RTYPE >::empty ( ) const
inline

Definition at line 161 of file string_proxy.h.

References Rcpp::internal::string_proxy< RTYPE >::begin().

Here is the call graph for this function:

◆ end()

template<int RTYPE>
iterator Rcpp::internal::string_proxy< RTYPE >::end ( ) const
inline

Definition at line 159 of file string_proxy.h.

References Rcpp::internal::string_proxy< RTYPE >::begin(), and Rcpp::internal::string_proxy< RTYPE >::size().

Referenced by Rcpp::internal::string_proxy< RTYPE >::apply().

Here is the call graph for this function:

◆ get()

template<int RTYPE>
SEXP Rcpp::internal::string_proxy< RTYPE >::get ( ) const
inline

◆ import()

◆ move()

template<int RTYPE>
void Rcpp::internal::string_proxy< RTYPE >::move ( R_xlen_t  n)
inline

Definition at line 145 of file string_proxy.h.

◆ operator char *()

template<int RTYPE>
Rcpp::internal::string_proxy< RTYPE >::operator char * ( ) const
inline

rhs use. Retrieves the current value of the element this proxy refers to and convert it to a C string

Definition at line 118 of file string_proxy.h.

References Rcpp::internal::string_proxy< RTYPE >::operator+.

◆ operator SEXP()

template<int RTYPE>
Rcpp::internal::string_proxy< RTYPE >::operator SEXP ( ) const
inline

rhs use. Retrieves the current value of the element this proxy refers to.

Definition at line 109 of file string_proxy.h.

◆ operator!=() [1/3]

template<int RTYPE>
bool Rcpp::internal::string_proxy< RTYPE >::operator!= ( const char *  other)
inline

Definition at line 184 of file string_proxy.h.

References Rcpp::internal::string_proxy< RTYPE >::begin().

Here is the call graph for this function:

◆ operator!=() [2/3]

template<int RTYPE>
bool Rcpp::internal::string_proxy< RTYPE >::operator!= ( const string_proxy< RTYPE > &  other)
inline

Definition at line 191 of file string_proxy.h.

References Rcpp::internal::string_proxy< RTYPE >::begin().

Here is the call graph for this function:

◆ operator!=() [3/3]

template<int RTYPE>
bool Rcpp::internal::string_proxy< RTYPE >::operator!= ( SEXP  other) const
inline

Definition at line 199 of file string_proxy.h.

◆ operator+=() [1/2]

template<int RTYPE>
template<typename T >
string_proxy& Rcpp::internal::string_proxy< RTYPE >::operator+= ( const T &  rhs)

lhs use. Adds the content of the rhs proxy to the element this proxy refers to.

Referenced by Rcpp::internal::string_proxy< RTYPE >::import().

◆ operator+=() [2/2]

template<int RTYPE>
template<typename T >
string_proxy<RTYPE>& Rcpp::internal::string_proxy< RTYPE >::operator+= ( const T &  rhs)

Definition at line 505 of file String.h.

◆ operator=() [1/7]

template<int RTYPE>
string_proxy& Rcpp::internal::string_proxy< RTYPE >::operator= ( const string_proxy< RTYPE > &  other)
inline

lhs use. Assign the value of the referred element to the current content of the element referred by the rhs proxy

Parameters
rhsanother proxy, possibly from another vector

Definition at line 55 of file string_proxy.h.

◆ operator=() [2/7]

template<int RTYPE>
string_proxy< RTYPE > & Rcpp::internal::string_proxy< RTYPE >::operator= ( const const_string_proxy< RTYPE > &  other)

Definition at line 171 of file const_string_proxy.h.

◆ operator=() [3/7]

template<int RTYPE>
string_proxy< RTYPE > & Rcpp::internal::string_proxy< RTYPE >::operator= ( const String s)

Definition at line 487 of file String.h.

References Rcpp::String::get_sexp().

Here is the call graph for this function:

◆ operator=() [4/7]

template<int RTYPE>
template<typename T >
string_proxy& Rcpp::internal::string_proxy< RTYPE >::operator= ( const std::basic_string< T > &  rhs)
inline

lhs use. Assigns the value of the referred element of the character vector

Parameters
rhsnew content for the element referred by this proxy

Definition at line 71 of file string_proxy.h.

◆ operator=() [5/7]

template<int RTYPE>
string_proxy& Rcpp::internal::string_proxy< RTYPE >::operator= ( const char *  rhs)
inline

Definition at line 76 of file string_proxy.h.

◆ operator=() [6/7]

template<int RTYPE>
string_proxy& Rcpp::internal::string_proxy< RTYPE >::operator= ( const wchar_t *  rhs)
inline

Definition at line 81 of file string_proxy.h.

◆ operator=() [7/7]

template<int RTYPE>
string_proxy& Rcpp::internal::string_proxy< RTYPE >::operator= ( SEXP  rhs)
inline

Definition at line 87 of file string_proxy.h.

◆ operator==() [1/3]

template<int RTYPE>
bool Rcpp::internal::string_proxy< RTYPE >::operator== ( const char *  other)
inline

Definition at line 181 of file string_proxy.h.

References Rcpp::internal::string_proxy< RTYPE >::begin().

Here is the call graph for this function:

◆ operator==() [2/3]

template<int RTYPE>
bool Rcpp::internal::string_proxy< RTYPE >::operator== ( const string_proxy< RTYPE > &  other)
inline

Definition at line 188 of file string_proxy.h.

References Rcpp::internal::string_proxy< RTYPE >::begin().

Here is the call graph for this function:

◆ operator==() [3/3]

template<int RTYPE>
bool Rcpp::internal::string_proxy< RTYPE >::operator== ( SEXP  other) const
inline

Definition at line 195 of file string_proxy.h.

◆ operator[]()

template<int RTYPE>
reference Rcpp::internal::string_proxy< RTYPE >::operator[] ( R_xlen_t  n)
inline

Definition at line 162 of file string_proxy.h.

References Rcpp::internal::string_proxy< RTYPE >::begin().

Here is the call graph for this function:

◆ set() [1/2]

template<int RTYPE>
template<typename T >
void Rcpp::internal::string_proxy< RTYPE >::set ( const T &  x)
inline

Definition at line 151 of file string_proxy.h.

◆ set() [2/2]

template<int RTYPE>
void Rcpp::internal::string_proxy< RTYPE >::set ( SEXP  x)
inline

Definition at line 154 of file string_proxy.h.

◆ size()

template<int RTYPE>
R_xlen_t Rcpp::internal::string_proxy< RTYPE >::size ( ) const
inline

Definition at line 160 of file string_proxy.h.

References Rcpp::internal::string_proxy< RTYPE >::begin().

Referenced by Rcpp::internal::string_proxy< RTYPE >::end().

Here is the call graph for this function:

◆ swap()

template<int RTYPE>
void Rcpp::internal::string_proxy< RTYPE >::swap ( string_proxy< RTYPE > &  other)
inline

◆ transform()

template<int RTYPE>
template<typename UnaryOperator >
void Rcpp::internal::string_proxy< RTYPE >::transform ( UnaryOperator  op)
inline

Definition at line 165 of file string_proxy.h.

References Rcpp::internal::string_proxy< RTYPE >::begin(), and Rcpp::internal::string_proxy< RTYPE >::buffer.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator+

template<int RTYPE>
template<int RT>
std::string operator+ ( const std::string &  x,
const string_proxy< RT > &  proxy 
)
friend

◆ operator<<

template<int RTYPE>
template<int RT>
std::ostream& operator<< ( std::ostream &  os,
const string_proxy< RT > &  proxy 
)
friend

Prints the element this proxy refers to to an output stream

Member Data Documentation

◆ buffer

template<int RTYPE>
std::string Rcpp::internal::string_proxy< RTYPE >::buffer
staticprivate

Definition at line 205 of file string_proxy.h.

Referenced by Rcpp::internal::string_proxy< RTYPE >::transform().

◆ index

template<int RTYPE>
R_xlen_t Rcpp::internal::string_proxy< RTYPE >::index

◆ parent


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