Rcpp Version 1.1.2
Loading...
Searching...
No Matches
Rcpp::internal::string_proxy< RTYPE, StoragePolicy > Class Template Reference

#include <string_proxy.h>

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

Public Types

typedef ::Rcpp::Vector< RTYPE, StoragePolicy > 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< RTYPE, StoragePolicy > &other)
template<template< class > class StoragePolicy2>
string_proxyoperator= (const string_proxy< RTYPE, StoragePolicy2 > &other)
template<template< class > class StoragePolicy2>
string_proxyoperator= (const const_string_proxy< RTYPE, StoragePolicy2 > &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) const
bool operator!= (const char *other) const
template<template< class > class SP>
bool operator== (const string_proxy< STRSXP, SP > &other) const
template<template< class > class SP>
bool operator!= (const string_proxy< STRSXP, SP > &other) const
bool operator== (SEXP other) const
bool operator!= (SEXP other) const
template<typename T>
string_proxy< RTYPE, StoragePolicy > & operator+= (const T &rhs)
template<template< class > class StoragePolicy2>
string_proxy< RTYPE, StoragePolicy1 > & operator= (const const_string_proxy< RTYPE, StoragePolicy2 > &other)

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, template< class > class StoragePolicy>
class Rcpp::internal::string_proxy< RTYPE, StoragePolicy >

Definition at line 29 of file string_proxy.h.

Member Typedef Documentation

◆ iterator

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

Definition at line 33 of file string_proxy.h.

◆ reference

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

Definition at line 34 of file string_proxy.h.

◆ VECTOR

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

Definition at line 32 of file string_proxy.h.

Constructor & Destructor Documentation

◆ string_proxy() [1/3]

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

Definition at line 36 of file string_proxy.h.

Referenced by operator=().

◆ string_proxy() [2/3]

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

Creates a proxy

Parameters
vreference to the associated character vector
indexindex

Definition at line 44 of file string_proxy.h.

◆ string_proxy() [3/3]

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

Definition at line 46 of file string_proxy.h.

Member Function Documentation

◆ apply() [1/2]

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

Definition at line 181 of file string_proxy.h.

◆ apply() [2/2]

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

Definition at line 186 of file string_proxy.h.

◆ begin()

◆ empty()

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

Definition at line 170 of file string_proxy.h.

◆ end()

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

◆ get()

◆ import()

template<int RTYPE, template< class > class StoragePolicy>
void Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::import ( const string_proxy< RTYPE, StoragePolicy > & other)
inline

Definition at line 102 of file string_proxy.h.

◆ move()

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

Definition at line 154 of file string_proxy.h.

◆ operator char *()

template<int RTYPE, template< class > class StoragePolicy>
Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::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 127 of file string_proxy.h.

◆ operator SEXP()

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

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

Definition at line 118 of file string_proxy.h.

◆ operator!=() [1/3]

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

Definition at line 193 of file string_proxy.h.

◆ operator!=() [2/3]

template<int RTYPE, template< class > class StoragePolicy>
template<template< class > class SP>
bool Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::operator!= ( const string_proxy< STRSXP, SP > & other) const
inline

Definition at line 203 of file string_proxy.h.

◆ operator!=() [3/3]

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

Definition at line 211 of file string_proxy.h.

◆ operator+=() [1/2]

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

Definition at line 698 of file String.h.

◆ operator+=() [2/2]

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

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

◆ operator=() [1/9]

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

Definition at line 85 of file string_proxy.h.

◆ operator=() [2/9]

template<int RTYPE, template< class > class StoragePolicy>
template<template< class > class StoragePolicy2>
string_proxy< RTYPE, StoragePolicy1 > & Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::operator= ( const const_string_proxy< RTYPE, StoragePolicy2 > & other)

Definition at line 174 of file const_string_proxy.h.

◆ operator=() [3/9]

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

◆ operator=() [4/9]

template<int RTYPE, template< class > class StoragePolicy>
template<typename T>
string_proxy & Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::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 80 of file string_proxy.h.

◆ operator=() [5/9]

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

Definition at line 680 of file String.h.

References Rcpp::String::get_sexp(), set(), and string_proxy().

Here is the call graph for this function:

◆ operator=() [6/9]

template<int RTYPE, template< class > class StoragePolicy>
string_proxy & Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::operator= ( const string_proxy< RTYPE, StoragePolicy > & 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.

◆ operator=() [7/9]

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

Definition at line 63 of file string_proxy.h.

◆ operator=() [8/9]

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

Definition at line 90 of file string_proxy.h.

◆ operator=() [9/9]

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

Definition at line 96 of file string_proxy.h.

◆ operator==() [1/3]

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

Definition at line 190 of file string_proxy.h.

◆ operator==() [2/3]

template<int RTYPE, template< class > class StoragePolicy>
template<template< class > class SP>
bool Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::operator== ( const string_proxy< STRSXP, SP > & other) const
inline

Definition at line 198 of file string_proxy.h.

◆ operator==() [3/3]

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

Definition at line 207 of file string_proxy.h.

◆ operator[]()

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

Definition at line 171 of file string_proxy.h.

◆ set() [1/2]

◆ set() [2/2]

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

Definition at line 163 of file string_proxy.h.

◆ size()

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

Definition at line 169 of file string_proxy.h.

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

◆ swap()

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

Definition at line 146 of file string_proxy.h.

◆ transform()

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

Definition at line 174 of file string_proxy.h.

◆ operator+

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

◆ operator<<

template<int RTYPE, template< class > class StoragePolicy>
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, template< class > class StoragePolicy>
std::string Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::buffer
staticprivate

Definition at line 216 of file string_proxy.h.

◆ index

template<int RTYPE, template< class > class StoragePolicy>
R_xlen_t Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::index

Definition at line 153 of file string_proxy.h.

Referenced by Rcpp::internal::string_proxy< STRSXP >::swap().

◆ parent

template<int RTYPE, template< class > class StoragePolicy>
VECTOR* Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::parent

Definition at line 152 of file string_proxy.h.

Referenced by Rcpp::internal::string_proxy< STRSXP >::swap().


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