CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
fwd.h
1
2#ifndef __fwd_h__
3#define __fwd_h__
4
5#include <cstddef>
6#include <cstdint>
7#include <type_traits>
8#include <locale>
9#include <codecvt>
10#include <string>
11
13template<class T>
14struct EnumMetaInfo; // declared out of System namespace
15
16// Forward declarations
17namespace System {
18
19 class IFormatProvider;
20
21 template<class T>
22 class SmartPtr;
23
24 namespace Text {
25 class DecoderFallback;
28 class EncoderFallback;
30 class Encoder;
31 class Decoder;
32 class Encoding;
33 class EncodingInfo;
36 }
37
38 namespace IO {
39 class Stream;
40 class FileStream;
41 class MemoryStream;
42 class StreamReader;
43 class StreamWriter;
44 class FileInfo;
45 class FileSystemInfo;
46 class DirectoryInfo;
47 }
48
49
50 namespace Drawing {
51 class SizeF;
52 class PointF;
53 class Size;
54 class Point;
55 class Rectangle;
56 class RectangleF;
57 }
58
59 namespace Globalization
60 {
61 class CultureInfo;
62 }
63
64// Pointer typedefs
89
100
107
108}
109
110// Common typedefs
111
113typedef char16_t char_t;
114
116struct IntPtr_helper
117 : std::enable_if<sizeof(void*) == sizeof(uint32_t), uint32_t>
118 , std::enable_if<sizeof(void*) == sizeof(uint64_t), uint64_t>
119{};
121typedef IntPtr_helper::type IntPtr;
122static_assert(sizeof(void*) == sizeof(IntPtr), "Failed to set up IntPtr type");
124const IntPtr IntPtrZero = 0;
125
127#define ASPOSE_T(x) u##x
128
130#define __WIDEN2(quote) L##quote
132#define __WIDEN(quote) __WIDEN2(quote)
133
135#define __QUOTE1(x) #x
137#define __QUOTE2(x) __QUOTE1(x)
138
139#if defined(__GNUC__) || defined (__clang__)
140 // under gcc __PRETTY_FUNCTION__ is a variable, so it is impossible to widen :(
142 #define ASPOSE_CURRENT_FUNCTION System::Details::Utf8To16String(__PRETTY_FUNCTION__).c_str()
144 #define ASPOSE_CURRENT_FUNCTION_LINE System::Details::Utf8To16String((std::string(__PRETTY_FUNCTION__) + ":" + std::string(__QUOTE2(__LINE__))).c_str()).c_str()
145#elif defined(_MSC_VER)
147 #define ASPOSE_CURRENT_FUNCTION reinterpret_cast<const char16_t*>(__WIDEN(__FUNCSIG__))
148 #define ASPOSE_CURRENT_FUNCTION_LINE reinterpret_cast<const char16_t*>(__WIDEN(__FUNCSIG__ ":" __QUOTE2(__LINE__)))
149#else
151 #define ASPOSE_CURRENT_FUNCTION u""
153 #pragma message("ASPOSE_CURRENT_FUNCTION is undefined!")
154#endif
155
156#endif // __fwd_h__
Collection of culture-specific values and algorithms. Setter operations are only enabled on non-read-...
Definition: culture_info.h:32
Represents a file system path, a directory referred to by this path and provides instance methods for...
Definition: directory_info.h:19
Represents a path to a file and a file referred to by this path and provides methods for manipulating...
Definition: file_info.h:14
Represents a file stream supporting synchronous and asynchronous read and write operations....
Definition: file_stream.h:24
The base class for FileInfo and DirectoryInfo. Objects of this class should only be allocated using S...
Definition: file_system_info.h:31
Represents a stream that reads from and writes to memory. Objects of this class should only be alloca...
Definition: memory_stream.h:19
A base class for a variety of stream implementations. Objects of this class should only be allocated ...
Definition: stream.h:24
Represents a reader that reads characters from a byte stream. Objects of this class should only be al...
Definition: stream_reader.h:22
Represents a writer that writes characters to a byte stream. Objects of this class should only be all...
Definition: stream_writer.h:18
Provides buffer for fallback implementation. Objects of this class should only be allocated using Sys...
Definition: decoder_fallback_buffer.h:15
Provides fallback API to handle decoding error. Objects of this class should only be allocated using ...
Definition: decoder_fallback.h:14
Encapsulates decoding byte sequence into character sequence. Objects of this class should only be all...
Definition: decoder.h:19
Provides fallback strategy of replacing erroneous symbol with a stub. Objects of this class should on...
Definition: decoder_replacement_fallback.h:19
Provides buffer for fallback implementation. Objects of this class should only be allocated using Sys...
Definition: encoder_fallback_buffer.h:14
Provides fallback API to handle encoding error. Objects of this class should only be allocated using ...
Definition: encoder_fallback.h:15
Encapsulates encoding character sequence into byte sequence. Objects of this class should only be all...
Definition: encoder.h:18
Buffer for replacing encoding fallback strategy. Objects of this class should only be allocated using...
Definition: encoder_replacement_fallback_buffer.h:23
Provides fallback strategy of replacing erroneous symbol with a stub. Objects of this class should on...
Definition: encoder_replacement_fallback.h:18
Encoding services.
Definition: encoding.h:67
Brief info on encoding. Objects of this class should only be allocated using System::MakeObject() fun...
Definition: encoding.h:30
Definition: db_command.h:9
System::SmartPtr< System::IO::FileStream > FileStreamPtr
An alias for a smart pointer that points to an instance of System::IO::FileStream class.
Definition: fwd.h:93
System::SmartPtr< System::IFormatProvider > IFormatProviderPtr
An alias for a smart pointer that points to an instance of System::IFormatProvider class.
Definition: fwd.h:66
System::SmartPtr< System::Text::EncoderFallback > EncoderFallbackPtr
An alias for a smart pointer that points to an instance of System::Text::EncoderFallback class.
Definition: fwd.h:74
System::SmartPtr< System::IO::DirectoryInfo > DirectoryInfoPtr
An alias for a smart pointer that points to an instance of System::IO::DirectoryInfo class.
Definition: fwd.h:106
System::SmartPtr< System::Text::Decoder > DecoderPtr
An alias for a smart pointer that points to an instance of System::Text::Decoder class.
Definition: fwd.h:80
System::SmartPtr< System::Text::EncoderReplacementFallbackBuffer > EncoderReplacementFallbackBufferPtr
An alias for a smart pointer that points to an instance of System::Text::EncoderReplacementFallbackBu...
Definition: fwd.h:82
System::SmartPtr< System::IO::StreamWriter > StreamWriterPtr
An alias for a smart pointer that points to an instance of System::IO::StreamWriter class.
Definition: fwd.h:99
System::SmartPtr< System::IO::MemoryStream > MemoryStreamPtr
An alias for a smart pointer that points to an instance of System::IO::MemoryStream class.
Definition: fwd.h:95
System::SmartPtr< System::IO::StreamReader > StreamReaderPtr
An alias for a smart pointer that points to an instance of System::IO::StreamReader class.
Definition: fwd.h:97
System::SmartPtr< System::Text::Encoder > EncoderPtr
An alias for a smart pointer that points to an instance of System::Text::Encoder class.
Definition: fwd.h:78
System::SmartPtr< System::Text::Encoding > EncodingPtr
An alias for a smart pointer that points to an instance of System::Text::Encoding class.
Definition: fwd.h:86
System::SmartPtr< System::Text::EncodingInfo > EncodingInfoPtr
An alias for a smart pointer that points to an instance of System::Text::EncodingInfo class.
Definition: fwd.h:88
System::SmartPtr< System::Text::DecoderFallbackBuffer > DecoderFallbackBufferPtr
An alias for a smart pointer that points to an instance of System::Text::DecoderFallbackBuffer class.
Definition: fwd.h:70
System::SmartPtr< System::IO::Stream > StreamPtr
An alias for a smart pointer that points to an instance of System::IO::Stream class.
Definition: fwd.h:91
System::SmartPtr< System::Text::EncoderFallbackBuffer > EncoderFallbackBufferPtr
An alias for a smart pointer that points to an instance of System::Text::EncoderFallbackBuffer class.
Definition: fwd.h:76
System::SmartPtr< System::IO::FileSystemInfo > FileSystemInfoPtr
An alias for a smart pointer that points to an instance of System::IO::FileSystemInfo class.
Definition: fwd.h:104
System::SmartPtr< System::Text::EncoderReplacementFallback > EncoderReplacementFallbackPtr
An alias for a smart pointer that points to an instance of System::Text::EncoderReplacementFallback c...
Definition: fwd.h:84
System::SmartPtr< System::IO::FileInfo > FileInfoPtr
An alias for a smart pointer that points to an instance of System::IO::FileInfo class.
Definition: fwd.h:102
System::SmartPtr< System::Text::DecoderReplacementFallback > DecoderReplacementFallbackPtr
An alias for a smart pointer that points to an instance of System::Text::DecoderReplacementFallback c...
Definition: fwd.h:72
System::SmartPtr< System::Text::DecoderFallback > DecoderFallbackPtr
An alias for a smart pointer that points to an instance of System::Text::DecoderFallback class.
Definition: fwd.h:68