Rcpp Version 0.10.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
internal::string_proxy< RTYPE > Class Template Reference

#include <string_proxy.h>

Public Types

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

Public Member Functions

 string_proxy ()
 string_proxy (VECTOR &v, int index_)
 string_proxy (const string_proxy &other)
string_proxyoperator= (const string_proxy &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 (int n)
SEXP get () const
template<typename T >
void set (const T &x)
void set (SEXP x)
iterator begin () const
iterator end () const
int size () const
reference operator[] (int 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)
template<int RTYPE>
string_proxy< RTYPE > & operator= (const String &s)
template<typename T >
string_proxy< RTYPE > & operator+= (const T &rhs)

Public Attributes

VECTORparent
int 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 internal::string_proxy< RTYPE >

Definition at line 28 of file string_proxy.h.

Member Typedef Documentation

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

Definition at line 32 of file string_proxy.h.

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

Definition at line 33 of file string_proxy.h.

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

Definition at line 31 of file string_proxy.h.

Constructor & Destructor Documentation

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

Definition at line 35 of file string_proxy.h.

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

Creates a proxy

Parameters
vreference to the associated character vector
indexindex

Definition at line 43 of file string_proxy.h.

References RCPP_DEBUG_2.

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

Definition at line 48 of file string_proxy.h.

Member Function Documentation

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

Definition at line 173 of file string_proxy.h.

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

Here is the call graph for this function:

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

Definition at line 178 of file string_proxy.h.

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

Here is the call graph for this function:

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

Definition at line 161 of file string_proxy.h.

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

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

Here is the call graph for this function:

template<int RTYPE>
SEXP internal::string_proxy< RTYPE >::get ( ) const
inline
template<int RTYPE>
void internal::string_proxy< RTYPE >::import ( const string_proxy< RTYPE > &  other)
inline
template<int RTYPE>
void internal::string_proxy< RTYPE >::move ( int  n)
inline

Definition at line 147 of file string_proxy.h.

References internal::string_proxy< RTYPE >::index, and n.

template<int RTYPE>
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 119 of file string_proxy.h.

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

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

Definition at line 110 of file string_proxy.h.

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

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

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

Definition at line 395 of file String.h.

template<int RTYPE>
string_proxy& 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 58 of file string_proxy.h.

References internal::string_proxy< RTYPE >::get().

Here is the call graph for this function:

template<int RTYPE>
string_proxy& internal::string_proxy< RTYPE >::operator= ( const String &  s)
template<int RTYPE>
template<typename T >
string_proxy& 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 72 of file string_proxy.h.

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

Definition at line 77 of file string_proxy.h.

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

Definition at line 82 of file string_proxy.h.

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

Definition at line 88 of file string_proxy.h.

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

Definition at line 377 of file String.h.

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

Definition at line 182 of file string_proxy.h.

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

Here is the call graph for this function:

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

Definition at line 163 of file string_proxy.h.

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

Here is the call graph for this function:

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

Definition at line 153 of file string_proxy.h.

References x.

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

Definition at line 162 of file string_proxy.h.

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

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

Here is the call graph for this function:

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

Definition at line 138 of file string_proxy.h.

References internal::string_proxy< RTYPE >::index, internal::string_proxy< RTYPE >::parent, and PROTECT().

Here is the call graph for this function:

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

Definition at line 166 of file string_proxy.h.

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

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

Here is the call graph for this function:

Friends And Related Function Documentation

template<int RTYPE>
template<int RT>
std::string operator+ ( const std::string &  x,
const string_proxy< RT > &  proxy 
)
friend
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

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

Definition at line 187 of file string_proxy.h.

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


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