($Id: CachedString.h 1275 2012-03-17 14:01:29Z arr $)
Class CXXR::CachedString and associated C interface.
More...
#include "CXXR/String.h"
#include <tr1/unordered_map>
#include <string>
#include "CXXR/Allocator.hpp"
#include "CXXR/SchwarzCounter.hpp"
Go to the source code of this file.
Namespaces |
namespace | CXXR |
| Namespace for the CXXR project.
|
Detailed Description
Class CXXR::CachedString and associated C interface.
Function Documentation
Is a String cached?
- Parameters:
-
- Returns:
- a non-zero value iff x points to a CachedString.
SEXP Rf_mkChar |
( |
const char * |
str | ) |
|
|
inline |
Get a pointer to a cached ASCII string object.
If no cached string with the specified text currently exists, one will be created. Otherwise a pointer to the existing cached string will be returned.
- Parameters:
-
str | The text of the required cached string. |
- Returns:
- Pointer to a string object representing the specified text.
SEXP Rf_mkCharCE |
( |
const char * |
str, |
|
|
cetype_t |
encoding |
|
) |
| |
|
inline |
Get a pointer to a cached string object.
If no cached string with the specified text and encoding currently exists, one will be created. Otherwise a pointer to the existing cached string will be returned.
- Parameters:
-
str | The text of the required cached string. |
encoding | The encoding of the required CachedString. Only CE_NATIVE, CE_UTF8 or CE_LATIN1 are permitted in this context (checked). |
- Returns:
- Pointer to a string object representing the specified text in the specified encoding.
SEXP Rf_mkCharLen |
( |
const char * |
text, |
|
|
int |
length |
|
) |
| |
|
inline |
Create a CXXR::UncachedString object for specified text.
- Parameters:
-
text | The text of the string to be created, possibly including embedded null characters. The encoding is assumed to be CE_NATIVE. |
length | The length of the string pointed to by text. Must be nonnegative. The created string will comprise the text plus an appended null byte. |
- Returns:
- Pointer to the created string.
SEXP Rf_mkCharLenCE |
( |
const char * |
text, |
|
|
int |
length, |
|
|
cetype_t |
encoding |
|
) |
| |
Create a CXXR::UncachedString object for specified text and encoding.
- Parameters:
-
text | The text of the string to be created, possibly including embedded null characters. The encoding is assumed to be CE_NATIVE. |
length | The length of the string pointed to by text. Must be nonnegative. The created string will comprise the text plus an appended null byte. |
encoding | The encoding of the required CachedString. Only CE_NATIVE, CE_UTF8 or CE_LATIN1 are permitted in this context (checked). |
- Returns:
- Pointer to the created string.