Oracle Coherence for C++ API
Release 3.7.1.0

E22845-01

String::StringHandle Class Template Reference

#include <coherence/lang/String.hpp>

Inherits TypedHandle< T >.

List of all members.


Detailed Description

template<class T>
class coherence::lang::String::StringHandle< T >

StringHandle provides standard TypedHandle features as well as auto-boxing support for standard string types including:.

Boxing from wchar_t[] is supported, but requires an explicit constructor call in order to avoid ambiguity when assigning a String handle/view to NULL.

Unboxing to char[] and wchar[] is not supported as it is unsafe to maintain a reference to the underlying character array without holding a reference to the String. Unboxing to std::string, and std::wstring is both supported and safe.
 

Public Member Functions

 StringHandle ()
 Create an empty StringHandle.
 StringHandle (const char *ach)
 Create a new StringHandle from a boxable type.
 StringHandle (const wchar_t *ach)
 Create a new StringHandle from a boxable type.
template<class C, class R, class A>
 StringHandle (const std::basic_string< C, R, A > &s)
 Create a new StringHandle from a boxable type.
template<class O>
 S (const TypedHandle< O > &that)
 Create a new StringHandle from the TypedHandle with a type conversion.
 StringHandle (const StringHandle &that)
 The copy constructor.
 StringHandle (T *o)
 Create a new StringHandle from the raw pointer.
template<class O>
StringHandleoperator= (const TypedHandle< O > &that)
 The assignment operator.
StringHandleoperator= (const char *ach)
 The "boxing" operator.
template<class C, class R, class A>
StringHandleoperator= (const std::basic_string< C, R, A > &s)
 The "boxing" operator.
template<class C, class R, class A>
 o () const
 The "unboxing" operator.


Member Function Documentation

o (  )  const [inline]

The "unboxing" operator.

Returns:
a copy of the referenced Object


The documentation for this class was generated from the following file:
Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.