22#ifndef Rcpp__vector__string_proxy_h
23#define Rcpp__vector__string_proxy_h
28 template<
int RTYPE,
template <
class>
class StoragePolicy>
32 typedef typename ::Rcpp::Vector<RTYPE, StoragePolicy>
VECTOR ;
111 template <
typename T>
127 operator char*()
const {
128 return const_cast<char*
>(
CHAR(
get()) );
159 template <
typename T>
160 inline void set(
const T& x ){
173 template <
typename UnaryOperator>
180 template <
typename OutputIterator,
typename UnaryOperator>
182 std::transform(
begin(),
end(), target, op ) ;
185 template <
typename UnaryOperator>
187 std::for_each(
begin(),
end(), op );
197 template<
template <
class>
class SP>
202 template<
template <
class>
class SP>
223 const_cast<char *
>(lhs.
begin() ),
224 const_cast<char *
>(rhs.
begin())
231 const_cast<char *
>(lhs.
begin() ),
232 const_cast<char *
>(rhs.
begin())
239 const_cast<char *
>(lhs.
begin() ),
240 const_cast<char *
>(rhs.
begin())
247 const_cast<char *
>(lhs.
begin() ),
248 const_cast<char *
>(rhs.
begin())
260 return x +
static_cast<const char*
>(y) ;
void apply(OutputIterator target, UnaryOperator op)
string_proxy & operator=(const std::basic_string< T > &rhs)
void transform(UnaryOperator op)
reference operator[](R_xlen_t n)
friend std::string operator+(const std::string &x, const string_proxy< RT > &proxy)
bool operator==(SEXP other) const
string_proxy & operator=(const wchar_t *rhs)
static std::string buffer
string_proxy & operator=(const const_string_proxy< RTYPE, StoragePolicy2 > &other)
bool operator!=(const string_proxy< STRSXP, SP > &other) const
string_proxy & operator+=(const T &rhs)
bool operator==(const char *other) const
void apply(UnaryOperator op)
string_proxy(VECTOR &v, R_xlen_t index_)
friend std::ostream & operator<<(std::ostream &os, const string_proxy< RT > &proxy)
bool operator==(const string_proxy< STRSXP, SP > &other) const
void swap(string_proxy &other)
bool operator!=(SEXP other) const
::Rcpp::Vector< RTYPE, StoragePolicy > VECTOR
string_proxy & operator=(const string_proxy< RTYPE, StoragePolicy > &other)
string_proxy & operator=(const string_proxy< RTYPE, StoragePolicy2 > &other)
string_proxy(const string_proxy &other)
string_proxy & operator=(SEXP rhs)
bool operator!=(const char *other) const
string_proxy & operator=(const char *rhs)
bool operator<=(const const_string_proxy< RT > &lhs, const const_string_proxy< RT > &rhs)
T as(SEXP x, ::Rcpp::traits::r_type_primitive_tag)
bool operator>=(const const_string_proxy< RT > &lhs, const const_string_proxy< RT > &rhs)
bool operator<(const const_string_proxy< RT > &lhs, const const_string_proxy< RT > &rhs)
std::ostream & operator<<(std::ostream &os, const const_string_proxy< STRSXP, StoragePolicy > &proxy)
std::string operator+(const std::string &x, const const_string_proxy< STRSXP, StoragePolicy > &y)
bool operator>(const const_string_proxy< RT > &lhs, const const_string_proxy< RT > &rhs)