2#ifndef _aspose_system_io_text_writer_h_
3#define _aspose_system_io_text_writer_h_
5#include "system/string.h"
6#include "system/object.h"
7#include "system/array.h"
8#include "system/idisposable.h"
9#include "system/exceptions.h"
10#include "system/iformatprovider.h"
15namespace System {
namespace IO {
45 virtual void Close() { Dispose(
true); }
54 virtual ASPOSECPP_SHARED_API
void Write(
bool value);
57 virtual ASPOSECPP_SHARED_API
void Write(char_t value);
63 virtual ASPOSECPP_SHARED_API
void Write(
double value);
66 virtual ASPOSECPP_SHARED_API
void Write(
int value);
69 virtual ASPOSECPP_SHARED_API
void Write(int64_t value);
72 virtual ASPOSECPP_SHARED_API
void Write(
float value);
78 virtual ASPOSECPP_SHARED_API
void Write(uint32_t value);
81 virtual ASPOSECPP_SHARED_API
void Write(uint64_t value);
98 virtual ASPOSECPP_SHARED_API
void WriteLine(
bool value);
101 virtual ASPOSECPP_SHARED_API
void WriteLine(char_t value);
107 virtual ASPOSECPP_SHARED_API
void WriteLine(
double value);
113 virtual ASPOSECPP_SHARED_API
void WriteLine(int64_t value);
116 virtual ASPOSECPP_SHARED_API
void WriteLine(
float value);
122 virtual ASPOSECPP_SHARED_API
void WriteLine(uint32_t value);
125 virtual ASPOSECPP_SHARED_API
void WriteLine(uint64_t value);
136 virtual ASPOSECPP_SHARED_API
void Write(
const char_t* value);
139 virtual ASPOSECPP_SHARED_API
void WriteLine(
const char_t* value);
151 template<
class... TArgs>
161 template<
class... TArgs>
171 virtual ASPOSECPP_SHARED_API
void WriteImpl(
const char_t* value, int32_t length);
175 virtual ASPOSECPP_SHARED_API
void Dispose(
bool disposing);
Represents a decimal number. This type should be allocated on stack and passed to functions by value ...
Definition: decimal.h:107
Defines method that releases resources owned by the current object. Objects of this class should only...
Definition: idisposable.h:30
A base class for classes that represent writers that writes sequences of characters to different dest...
Definition: text_writer.h:21
virtual void WriteLine(int64_t value)
Writes the string representation of the specified 64-bit integer value followed by the line-terminati...
virtual void WriteLine(const ArrayPtr< char_t > &buffer, int32_t index, int32_t count)
Writes the specified subrange of UTF-16 characters from the specified character array followed by the...
virtual void WriteLine(const TypeInfo &value)
Writes the string representation of the specified TypeInfo object followed by the line-terminating ch...
virtual void Write(double value)
Writes the string representation of the specified double-precision floating point value to the stream...
IFormatProviderPtr internalFormatProvider
IFormatProvider used by the current object.
Definition: text_writer.h:187
virtual void Write(char_t value)
Writes the specified character to the stream.
TextWriter(const IFormatProviderPtr &formatProvider)
Constructs a new intstance of TextWriter class that uses the specified IFormatProvider object.
System::SharedPtr< TextWriter > Ptr
An alias for a shared pointer to this class.
Definition: text_writer.h:26
virtual System::String get_NewLine() const
Returns a line terminator string.
String get_NewLine()
Returns a line terminator string.
virtual SharedPtr< IFormatProvider > get_FormatProvider() const
Returns the currently used IFormatProvider object.
virtual void Write(uint64_t value)
Writes the string representation of the specified unsigned 64-bit integer value to the stream.
void Write(const String &format, const TArgs &... args)
Writes the specified values formatted according to the specified format to the stream.
Definition: text_writer.h:152
virtual void WriteLine(bool value)
Writes the string representation of the specified boolean value followed by the line-terminating char...
virtual void WriteLine(float value)
Writes the string representation of the specified single-precision floating point value followed by t...
virtual void Dispose(bool disposing)
Releases all resources used by the current object and closes the undelying stream.
virtual void WriteLine(Decimal value)
Writes the string representation of the specified Decimal object followed by the line-terminating cha...
virtual void WriteLine(int value)
Writes the string representation of the specified 32-bit integer value followed by the line-terminati...
virtual void Write(Decimal value)
Writes the string representation of the specified Decimal object to the stream.
virtual SharedPtr< System::Text::Encoding > get_Encoding()=0
Returns the currently used encoding.
virtual void WriteLine(const SharedPtr< Object > &value)
Writes the string representation of the specified object followed by the line-terminating characters ...
IFormatProviderPtr get_FormatProvider()
Returns the currently used IFormatProvider object.
virtual void WriteLine(double value)
Writes the string representation of the specified double-precision floating point value followed by t...
void WriteLine(const String &format, const TArgs &... args)
Writes the specified values formatted according to the specified format followed by the line-terminat...
Definition: text_writer.h:162
virtual void Write(const TypeInfo &value)
Writes the string representation of the specified TypeInfo object to the stream.
TextWriter()
Constructs a new intstance of TextWriter class that uses IFormatProvider object from the invariant cu...
virtual void WriteImpl(const char_t *value, int32_t length)
Writes the specified c-string to the stream.
virtual void set_NewLine(const System::String &value)
Sets a line terminator string.
virtual void WriteLine(const ArrayPtr< char_t > &buffer)
Writes all characetrs from the specified array followed by the line-terminating characters to the str...
virtual void Close()
Closes the stream and releases aquired resources.
Definition: text_writer.h:45
virtual void Write(const char_t *value)
Writes the specified c-string to the stream.
virtual void Write(const ArrayPtr< char_t > &buffer)
Writes all characetrs from the specified array to the stream.
virtual void Dispose() override
Releases all resources used by the current object and closes the undelying stream.
Definition: text_writer.h:43
virtual void Flush()
Flushes the content of the buffer to the underlying stream.
Definition: text_writer.h:47
virtual void Write(int value)
Writes the string representation of the specified 32-bit integer value to the stream.
virtual void WriteLine()
Writes line terminator characters to the stream.
virtual void Write(float value)
Writes the string representation of the specified single-precision floating point value to the stream...
virtual void WriteLine(const char_t *value)
Writes the specified c-string followed by the line-terminating characters to the stream.
virtual ~TextWriter()
Destructor.
Definition: text_writer.h:37
virtual void WriteLine(char_t value)
Writes the specified character followed by the line-terminating characters to the stream.
virtual void WriteLine(uint32_t value)
Writes the string representation of the specified unsigned 32-bit integer value followed by the line-...
virtual void Write(int64_t value)
Writes the string representation of the specified 64-bit integer value to the stream.
virtual void Write(bool value)
Writes the string representation of the specified boolean value to the stream.
virtual void Write(const String &value)
Writes the specified string to the stream.
virtual void Write(uint32_t value)
Writes the string representation of the specified unsigned 32-bit integer value to the stream.
virtual void WriteLine(const String &value)
Writes the specified string followed by the line-terminating characters to the stream.
virtual void WriteLine(uint64_t value)
Writes the string representation of the specified unsigned 64-bit integer value followed by the line-...
virtual void Write(const ArrayPtr< char_t > &buffer, int32_t index, int32_t count)
Writes the specified subrange of UTF-16 characters from the specified character array to the stream.
virtual void Write(const SharedPtr< Object > &value)
Writes the string representation of the specified object to the stream.
ArrayPtr< char_t > CoreNewLine
The line terminator string.
Definition: text_writer.h:185
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
static String Format(const SharedPtr< IFormatProvider > &fp, const String &format, const Args &... args)
Formats string in C# style.
Definition: string.h:1405
Represents a particular type and provides information about it.
Definition: type_info.h:109
@ TypeInfo
Specifies that the member is a type.
Definition: db_command.h:9