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

#include <string_proxy.h>

List of all members.

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 std::string &rhs)
string_proxyoperator= (const char &rhs)
string_proxyoperator= (SEXP rhs)
void import (const string_proxy &other)
string_proxyoperator+= (const string_proxy &rhs)
string_proxyoperator+= (const std::string &rhs)
 operator SEXP () const
 operator char * () const
void swap (string_proxy &other)
void move (int n)
SEXP get () const
void set (SEXP x)
void set (const std::string &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)

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 27 of file string_proxy.h.


Member Typedef Documentation

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

Definition at line 31 of file string_proxy.h.

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

Definition at line 32 of file string_proxy.h.

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

Definition at line 30 of file string_proxy.h.


Constructor & Destructor Documentation

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

Definition at line 34 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 42 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 47 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 171 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 176 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 159 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 146 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 123 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 114 of file string_proxy.h.

template<int RTYPE>
string_proxy& internal::string_proxy< RTYPE >::operator+= ( const string_proxy< RTYPE > &  rhs) [inline]

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

Definition at line 93 of file string_proxy.h.

References internal::string_proxy< RTYPE >::buffer, internal::string_proxy< RTYPE >::index, and internal::string_proxy< RTYPE >::parent.

template<int RTYPE>
string_proxy& internal::string_proxy< RTYPE >::operator+= ( const std::string &  rhs) [inline]

lhs use. Adds the string to the element this proxy refers to

Definition at line 103 of file string_proxy.h.

References internal::string_proxy< RTYPE >::buffer, internal::string_proxy< RTYPE >::index, and internal::string_proxy< RTYPE >::parent.

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

Definition at line 78 of file string_proxy.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 57 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 std::string &  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 68 of file string_proxy.h.

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

Definition at line 73 of file string_proxy.h.

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

Definition at line 180 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 161 of file string_proxy.h.

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

Here is the call graph for this function:

template<int RTYPE>
void internal::string_proxy< RTYPE >::set ( SEXP  x) [inline]
template<int RTYPE>
void internal::string_proxy< RTYPE >::set ( const std::string &  x) [inline]

Definition at line 154 of file string_proxy.h.

References x.

template<int RTYPE>
int internal::string_proxy< RTYPE >::size ( ) const [inline]

Definition at line 160 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 137 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 164 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 [static, private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Defines