activemq-cpp-3.4.0
|
An object to which char sequences and values can be appended. More...
#include <src/main/decaf/lang/Appendable.h>
Public Member Functions | |
virtual | ~Appendable () |
virtual Appendable & | append (char value)=0 |
Appends the specified character to this Appendable. | |
virtual Appendable & | append (const CharSequence *csq)=0 |
Appends the specified character sequence to this Appendable. | |
virtual Appendable & | append (const CharSequence *csq, int start, int end)=0 |
Appends a subsequence of the specified character sequence to this Appendable. |
An object to which char sequences and values can be appended.
The Appendable interface must be implemented by any class whose instances are intended to receive formatted output from a Formatter.
TODO The characters to be appended should be valid Unicode characters as described in Unicode Character Representation. Note that supplementary characters may be composed of multiple 16-bit char values.
Appendables are not necessarily safe for multithreaded access. Thread safety is the responsibility of classes that extend and implement this interface.
Since this interface may be implemented by existing classes with different styles of error handling there is no guarantee that errors will be propagated to the invoker.
virtual decaf::lang::Appendable::~Appendable | ( | ) | [inline, virtual] |
virtual Appendable& decaf::lang::Appendable::append | ( | char | value | ) | [pure virtual] |
Appends the specified character to this Appendable.
value | The character to append. |
Exception | if an error occurs. |
Implemented in decaf::io::Writer, and decaf::nio::CharBuffer.
virtual Appendable& decaf::lang::Appendable::append | ( | const CharSequence * | csq, |
int | start, | ||
int | end | ||
) | [pure virtual] |
Appends a subsequence of the specified character sequence to this Appendable.
csq | - The character sequence from which a subsequence will be appended. If csq is NULL, then characters will be appended as if csq contained the string "null". |
start | The index of the first character in the subsequence. |
end | The index of the character following the last character in the subsequence. |
Exception | if an error occurs. |
IndexOutOfBoundsException | start is greater than end, or end is greater than csq.length() |
Implemented in decaf::io::Writer, and decaf::nio::CharBuffer.
virtual Appendable& decaf::lang::Appendable::append | ( | const CharSequence * | csq | ) | [pure virtual] |
Appends the specified character sequence to this Appendable.
csq | The character sequence from which a subsequence will be appended. If csq is NULL, then characters will be appended as if csq contained the string "null". |
Exception | if an error occurs. |
Implemented in decaf::io::Writer, and decaf::nio::CharBuffer.