CXXR (C++ R)
Public Member Functions | Static Public Member Functions

CXXR::UncachedString Class Reference

String object not held in a cache. More...

#include <UncachedString.h>

Inheritance diagram for CXXR::UncachedString:
Inheritance graph
[legend]
Collaboration diagram for CXXR::UncachedString:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 UncachedString (size_t sz, cetype_t encoding=CE_NATIVE)
 Create an UncachedString object, leaving its contents uninitialized.
 UncachedString (const std::string &str, cetype_t encoding=CE_NATIVE)
 Create an UncachedString object from a std::string.
char * ptr ()
 Provide read-write access to the string.
const char * typeName () const
 Name within R of this type of object.

Static Public Member Functions

static const char * staticTypeName ()
 The name by which this type is known in R.

Detailed Description

String object not held in a cache.

Unlike CachedString objects, at any one time more than one UncachedString with the same text and encoding may exist, and the text and encoding of an UncachedString may duplicate that of a CachedString. Moreover, the content and encoding of an UncachedString may be modified after it has been constructed; however, since the length may not be modified, this is of limited usefulness.

Deprecated:
The use of CachedString objects is to be preferred.

Constructor & Destructor Documentation

CXXR::UncachedString::UncachedString ( size_t  sz,
cetype_t  encoding = CE_NATIVE 
) [inline, explicit]

Create an UncachedString object, leaving its contents uninitialized.

Parameters:
szNumber of elements required. Zero is permissible.
encodingThe encoding of the required CachedString. Only CE_NATIVE, CE_UTF8 or CE_LATIN1 are permitted in this context (checked).
UncachedString::UncachedString ( const std::string &  str,
cetype_t  encoding = CE_NATIVE 
) [explicit]

Create an UncachedString object from a std::string.

Parameters:
strThe std::string whose text is to be copied into the constructed UncachedString. (Embedded null characters are permissible.)
encodingThe encoding of the required CachedString. Only CE_NATIVE, CE_UTF8 or CE_LATIN1 are permitted in this context (checked).

Member Function Documentation

char* CXXR::UncachedString::ptr ( ) [inline]

Provide read-write access to the string.

Returns:
A pointer to the start of the string. This is intended for immediate use: in particular it should not be used after any other method has been applied to the UncachedString object, including in particular hash().
static const char* CXXR::UncachedString::staticTypeName ( ) [inline, static]

The name by which this type is known in R.

Returns:
the name by which this type is known in R.

Reimplemented from CXXR::String.

const char * UncachedString::typeName ( ) const [virtual]

Name within R of this type of object.

Returns:
the name by which this type of object is known within R.

Reimplemented from CXXR::RObject.


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