System Namespace Reference

Namespaces

namespace  BoxedValueDetail
 
namespace  Collections
 
namespace  ComponentModel
 
namespace  Constraints
 
namespace  Data
 
namespace  Diagnostics
 
namespace  Drawing
 
namespace  Globalization
 
namespace  IO
 
namespace  Linq
 
namespace  Net
 
namespace  Reflection
 
namespace  Resources
 
namespace  Runtime
 
namespace  Security
 
namespace  StringExtra
 
namespace  TestPredicates
 
namespace  Text
 
namespace  Threading
 
namespace  Timers
 
namespace  TypeCodeHelper
 
namespace  UriDetails
 
namespace  Web
 
namespace  Windows
 
namespace  WithLambda
 
namespace  Xml
 

Classes

class  Activator
 Contains methods to create types of objects. More...
 
class  Array
 Class that represents an array data structure. Objects of this class should only be allocated using System::MakeArray() and System::MakeObject() functions. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  ArraySegment
 Represents a segment of the one-dimensional array. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  Attribute
 A base class for custom attributes. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  BitConverter
 Contains methods that perform conversions of sequence of bytes to a value type and vice-versa. This is a static type with no instance services. You should never create instances of it by any means. More...
 
class  Boolean
 Class that keeps static members of System.Boolean .Net type. More...
 
class  BoxedEnum
 Represents boxed enumeration value. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  BoxedValue
 Represents a boxed value. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  BoxedValueBase
 A base class that defines an interface and implements some fundamental methods of a descendant class that represents a boxed value. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  Buffer
 Contains methods that manipulate raw byte arrays. This is a static type with no instance services. You should never create instances of it by any means. More...
 
class  Byte
 Contains methods to work with the unsigned 8-bit integer. More...
 
struct  CastResult
 Template magic to deduce cast results. More...
 
class  Char
 Provides methods for manipulation of characters represented as UTF-16 code units. This is a static type with no instance services. You should never create instances of it by any means. More...
 
struct  CollectionAssertHelper
 Heler API for collection-related operations. More...
 
class  Comparison
 Represents a pointer to the method that compares two objects of the same type. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
class  Console
 Provides methods for outputting data to the standard output stream. This is a static type with no instance services. You should never create instances of it by any means. More...
 
class  ConsoleOutput
 Represents the standard output stream. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
struct  Convert
 The structure that contains methods performing conversion of values of one type to the values of another type. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
class  DateTime
 Represents a specific date and time value on the time continuum. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
class  DateTimeOffset
 Contains the date and time of day relative to Coordinated Universal Time. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  DBNull
 Represents a non-existing value. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  Decimal
 Represents a decimal number. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
class  DefaultBoxedValue
 BoxedValue class implementation. Allows it BoxingValue specializations to be declared without duplicating common code. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  Delegate< ReturnType(ArgumentTypes...)>
 Represents a pointer to a function, method or a function object. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
class  Details_BadImageFormatException
 The exception that is thrown when the file image of a dynamic link library (DLL) or an executable program is invalid. Never create instances of this class manually. Use the BadImageFormatException class instead. Never wrap the BadImageFormatException class instances into System::SmartPtr.
 
class  Details_Exception
 Represents an exception. Never create instances of this class manually. Use the Exception class instead. Never wrap the Exception class instances into System::SmartPtr.
 
class  Details_ExceptionWithErrorCode
 The template class for an exception with an error code.
 
class  Details_ExceptionWithFilename
 The template class for an exception with a file name.
 
struct  Double
 Contains methods to work with the double-precision floating-point number. More...
 
class  DynamicWeakPtr
 Smart pointer class which tracks pointer modes of template arguments of stored object and updates them after each assignment. This type is a pointer to manage other object's deletion. It should be allocated on stack and passed to functions either by value or by const reference. More...
 
struct  Enum
 Provides methods that perform some operations on values of enum type. This is a static type with no instance services. You should never create instances of it by any means. More...
 
struct  EnumGetNameHelper
 Helper class that provides functionality of geting the strting name of enum constant. More...
 
struct  EnumParseHelper
 Helper class that provides functionality of converting a string representation of enum consnant into equivalent enum value. More...
 
class  EnumValues
 Provides meta information about enumeration constants of enum type E. More...
 
class  EnumValuesBase
 A base class for a class that represents meta information of enumeration type. More...
 
struct  Environment
 Environment services. This is a static type with no instance services. You should never create instances of it by any means. More...
 
class  EventArgs
 The base class for classes that represent a context that is passed to the event subscribers when an event is triggered. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  ExceptionWrapper
 Template that represents wrapper of exceptions that are derived from Exception class. More...
 
class  Func
 Function delegate. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
class  GC
 Represents an emulated Garbage Collection which acts more like a stub which effectively does nothing. This is a static type with no instance services. You should never create instances of it by any means.
 
class  Guid
 Represents a Globally Unique IDentifier This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
struct  HolderInitializer
 This class used to get persistent reference to the object instance, whatever it is lvalue or rvalue. To ubtain such reference, use 'HoldIfTemporary' method, that has there overloads. Two of them take rvalue as a parameter, and just return the reference to it. The third one, in opposite, takes lvalue as a parameter, makes a pointer copy, then return reference to that copy. Also, class has 'Hold' method to hold passed value unconditionally (used to copy values of a local on-stack variables or it's child references) More...
 
struct  HolderInitializer< T, false >
 HolderInitializer specialization for the case when T is a value type., The usage context allow to return reference to temporary objects, as it is guaranteed, that the instance will be copied by caller. So, this specialization is used just as a stub, and do nothing. More...
 
class  IAsyncResult
 Represents the status of asynchronous operation. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  ICloneable
 Defies a method that enables object cloning - creating a copy of an object. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  IComparable
 Defines a method that compares two objects. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  IConvertible
 Defines methods that convert the value of the implementing reference or value type to a common language runtime type that has an equivalent value. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  ICustomFormatter
 Defines a method that performs custom formatting of a string representation of a value represented by the specified object. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  IDisposable
 Defines method that releases resources owned by the current object. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  IEquatable
 Defines a method that determines the equality of two objects. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  IFormatProvider
 Defines a method that provides formatting information. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  IFormattable
 Defines a method that formats the value of the current object using the specified format string and format provider. More...
 
class  Int16
 Contains methods to work with the 16-bit integer. More...
 
class  Int32
 Contains methods to work with the 32-bit integer. More...
 
class  Int64
 Contains methods to work with the 64-bit integer. More...
 
struct  IsBoxable
 Template predicate that checks if boxing of the specified type is supported. More...
 
struct  IsExceptionWrapper
 A template predicate that determines if the specified type is a Exception class or its descendant. More...
 
struct  IsNullable
 A template predicate that determines if its template argument T in Nullable or its subclass. More...
 
struct  IsSmartPtr
 Trait class to check if a type is a specialization of SmartPtr class. More...
 
struct  IsStringByteSequence
 Template magic to check if a type is a sequence of string characters. More...
 
struct  IsStringLiteral
 Template magic to check if a type is a string literal. More...
 
struct  IsStringPointer
 Template magic to check if a type is a pointer to character string. More...
 
struct  IsWeakPtr
 Traits class to check if specific class is a specialization of System::WeakPtr. Doesn't check if instance is actually in weak mode. More...
 
class  LockContext
 Guard object implementing C# lock() statement. More...
 
struct  MakeConstRef
 Trait to make generic type "const reference" if it is String or a SmartPtr<> type. More...
 
class  MarshalByRefObject
 Provides access to objects across application domain boundaries in remoting-enabled applications. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
struct  Math
 Contains math functions. This is a static type with no instance services. You should never create instances of it by any means. More...
 
struct  MethodArgumentTuple< R(*)(Args...)>
 Defines tuple to store method arguments. More...
 
struct  MethodArgumentTuple< R(C::*)(Args...) const >
 Defines tuple to store method arguments. More...
 
struct  MethodArgumentTuple< R(C::*)(Args...)>
 Defines tuple to store method arguments. More...
 
class  MulticastDelegate< ReturnType(ArgumentTypes...)>
 Represents a collection of delegates. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
struct  MulticastDelegateTypeInfo
 Represents a pointer to TypeInfo object that contains information about MulticastDelegate class. More...
 
class  Nullable
 Forward declaration. More...
 
class  Object
 Base class that enables using methods available for System.Object class in C#. All non-trivial classes used with translated environment should inherit it. More...
 
class  ObjectExt
 Provides static methods that emulate C# Object methods called for non-Object C++ types (strings, numbers, etc.). This is a static type with no instance services. You should never create instances of it by any means. More...
 
class  ObjectType
 Provides static methods that implement object type getters. This is a static type with no instance services. You should never create instances of it by any means. More...
 
class  OperatingSystem
 Represents a particular operating system and provides information about it. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  Random
 Represents a pseudo-random number generator. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
struct  RemoveShared
 Trait structs to remove SharedPtr/WeakPtr from argument type. More...
 
struct  SByte
 Contains methods to work with the 8-bit integer. More...
 
class  ScopedCulture
 Represents a culture used within the scope. More...
 
struct  ScopeGuard
 The service class that provides services for running a particular function object when an instance of the class goes out of scope. More...
 
struct  Single
 Contains methods to work with the single-precision floating-point number. More...
 
class  SmartPtr
 Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting Object. This pointer type follows intrusive pointer semantics. Reference counter is stored either in Object itself or in counter structure which is tied to Object instance tightly. In any case, all SmartPtr instances form single ownership group regardless how they were created which is unlike how std::shared_ptr class behaves. Converting raw pointer to SmartPtr is safe given there are other SmartPtr instances holding shared references to the same object. SmartPtr class instance can be in one of two states: shared pointer and weak pointer. To keep object alive, one should have count of shared references to it positive. Both weak and shared pointers can be used to access pointed object (to call methods, read or write fields, etc.), but weak pointers do not participate to shared pointer reference counting. Object is being deleted when the last 'shared' SmartPtr pointer to it is being destroyed. So, make sure that this doesn't happen when no other shared SmartPtr pointers to object exist, e. g. during object construction or destruction. Use System::Object::ThisProtector sentry objects (in C++ code) or CppCTORSelfReference or CppSelfReference attribute (in C# code being translated) to fix this issue. Similarily, make sure to break loop references by using System::WeakPtr pointer class or System::SmartPtrMode::Weak pointer mode (in C++ code) or CppWeakPtr attribute (in C# code being translated). If two or more objects reference each other using 'shared' pointers, they will never be deleted. If pointer type (weak or shared) should be switched in runtime, use System::SmartPtr<T>::set_Mode() method or System::DynamicWeakPtr class. SmartPtr class doesn't contain any virtual methods. You should only inherit it if you're creating a memory management strategy of your own. This type is a pointer to manage other object's deletion. It should be allocated on stack and passed to functions either by value or by const reference. More...
 
class  SmartPtrInfo
 Service class to test and alter SmartPtr's contents without knowing final type. Used for garbage collection and loop references detection, etc. Think of it as of 'pointer to pointer'. We can't use SmartPtr's basetype as it doesn't have any; instead, we use this 'info' class. More...
 
class  String
 String class used across the library. Is a substitute for C# System.String when translating code. For optimization reasons, isn't considered an Object subclass. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
class  StringComparer
 Compares strings using different comparison modes. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  StringHashCompiletime
 A helper class that generates a hash value from a c-string. More...
 
struct  TestCompare
 Service structure providing interface to compare collections. More...
 
struct  TestTools
 Provides a set of useful methods that check some basic properties of different types and functions. More...
 
struct  TestToolsExt
 Common functions to be used by testing translation. More...
 
class  TimeSpan
 Represents a time interval. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
class  TimeZone
 Represents a time zone. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  TimeZoneInfo
 Represents an information destribing a particular time zone. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  Tuple
 Class that represents a tuple data structure. Maximum number of items is 8. More...
 
class  TupleFactory
 Provides static methods for creating tuple objects. More...
 
class  TypeInfo
 Represents a particular type and provides information about it. More...
 
struct  TypeInfoPtr
 Wrapper for a pointer to an instance of TypeInfo class. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
struct  UInt16
 Contains methods to work with the unsigned 16-bit integer. More...
 
struct  UInt32
 Contains methods to work with the unsigned 32-bit integer. More...
 
struct  UInt64
 Contains methods to work with the unsigned 64-bit integer. More...
 
class  Uri
 Unified resource identifier. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  UriBuilder
 Provides methods to construct and modify universial resource identifiers (URIs). Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  UriParser
 Used to parse a new URI scheme. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  UriShim
 Service class. More...
 
class  ValueType
 Baseclass for value types with Object inheritance being truncated for performance reasons. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
class  Version
 Represents a version number. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
class  Void
 
class  WeakPtr
 Subclass of System::SmartPtr which sets itself to weak mode at construction. Please note that this class doesn't guarantee that its instance will always remain in weak mode as set_Mode() is still accessible. This type is a pointer to manage other object's deletion. It should be allocated on stack and passed to functions either by value or by const reference. More...
 
struct  WeakPtrFromTypeParameter
 Trait struct to convert argument type to a weak-pointer, if it is a pointer type. More...
 
class  WeakReference< T >
 Represents a weak reference, which references an object while still allowing that object to be deleted. More...
 
class  WeakReference<>
 Represents a weak reference, which references an object while still allowing that object to be deleted. More...
 

Typedefs

template<typename T0 >
using SharedPtr = System::SmartPtr<T0>
 Alias for smart pointer widely used in the library.
 
typedef System::SmartPtr< System::IFormatProviderIFormatProviderPtr
 An alias for a smart pointer that points to an instance of System::IFormatProvider class.
 
typedef System::SmartPtr< System::Text::DecoderFallbackDecoderFallbackPtr
 An alias for a smart pointer that points to an instance of System::Text::DecoderFallback class.
 
typedef System::SmartPtr< System::Text::DecoderFallbackBufferDecoderFallbackBufferPtr
 An alias for a smart pointer that points to an instance of System::Text::DecoderFallbackBuffer class.
 
typedef System::SmartPtr< System::Text::DecoderReplacementFallbackDecoderReplacementFallbackPtr
 An alias for a smart pointer that points to an instance of System::Text::DecoderReplacementFallback class.
 
typedef System::SmartPtr< System::Text::EncoderFallbackEncoderFallbackPtr
 An alias for a smart pointer that points to an instance of System::Text::EncoderFallback class.
 
typedef System::SmartPtr< System::Text::EncoderFallbackBufferEncoderFallbackBufferPtr
 An alias for a smart pointer that points to an instance of System::Text::EncoderFallbackBuffer class.
 
typedef System::SmartPtr< System::Text::EncoderEncoderPtr
 An alias for a smart pointer that points to an instance of System::Text::Encoder class.
 
typedef System::SmartPtr< System::Text::DecoderDecoderPtr
 An alias for a smart pointer that points to an instance of System::Text::Decoder class.
 
typedef System::SmartPtr< System::Text::EncoderReplacementFallbackBufferEncoderReplacementFallbackBufferPtr
 An alias for a smart pointer that points to an instance of System::Text::EncoderReplacementFallbackBuffer class.
 
typedef System::SmartPtr< System::Text::EncoderReplacementFallbackEncoderReplacementFallbackPtr
 An alias for a smart pointer that points to an instance of System::Text::EncoderReplacementFallback class.
 
typedef System::SmartPtr< System::Text::EncodingEncodingPtr
 An alias for a smart pointer that points to an instance of System::Text::Encoding class.
 
typedef System::SmartPtr< System::Text::EncodingInfoEncodingInfoPtr
 An alias for a smart pointer that points to an instance of System::Text::EncodingInfo class.
 
typedef System::SmartPtr< System::IO::StreamStreamPtr
 An alias for a smart pointer that points to an instance of System::IO::Stream class.
 
typedef System::SmartPtr< System::IO::FileStreamFileStreamPtr
 An alias for a smart pointer that points to an instance of System::IO::FileStream class.
 
typedef System::SmartPtr< System::IO::MemoryStreamMemoryStreamPtr
 An alias for a smart pointer that points to an instance of System::IO::MemoryStream class.
 
typedef System::SmartPtr< System::IO::StreamReaderStreamReaderPtr
 An alias for a smart pointer that points to an instance of System::IO::StreamReader class.
 
typedef System::SmartPtr< System::IO::StreamWriterStreamWriterPtr
 An alias for a smart pointer that points to an instance of System::IO::StreamWriter class.
 
typedef System::SmartPtr< System::IO::FileInfoFileInfoPtr
 An alias for a smart pointer that points to an instance of System::IO::FileInfo class.
 
typedef System::SmartPtr< System::IO::FileSystemInfoFileSystemInfoPtr
 An alias for a smart pointer that points to an instance of System::IO::FileSystemInfo class.
 
typedef System::SmartPtr< System::IO::DirectoryInfoDirectoryInfoPtr
 An alias for a smart pointer that points to an instance of System::IO::DirectoryInfo class.
 
template<class... Args>
using Action = MulticastDelegate<void(Args...)>
 Delegate type that references methods that have no return value.
 
typedef System::ArrayPtr< uint8_t > ByteArrayPtr
 An alias for a smart pointer object that points to an array of unsigned 8-bit integers.
 
using AsyncCallback = System::MulticastDelegate<void(SharedPtr<IAsyncResult>)>
 A delegate type that represents a method to be called when asynchronous operation completes.
 
using BadImageFormatException = System::ExceptionWrapper<Details_BadImageFormatException>
 The exception that is thrown when the file image of a dynamic link library (DLL) or an executable program is invalid. Never wrap the BadImageFormatException class instances into System::SmartPtr.
 
template<class TInput , class TOutput >
using Converter = MulticastDelegate<TOutput(TInput)>
 Represents a pointer to the invokable entity that accepts a single argument of the TInput type and returns a value of the TOutput type.
 
template<class... Args>
using Event = MulticastDelegate<Args...>
 Represents an event - a mechanism through which subscribers are notified about an occurence of interest by means of a delegate invocation.
 
typedef SharedPtr< EventArgsEventArgsPtr
 Shared pointer to an instance of EventArgs class.
 
template<class TEventArgs = SharedPtr<EventArgs>>
using EventHandler = MulticastDelegate<void(System::SharedPtr<Object>, TEventArgs)>
 Represents a method that reacts to and processes an event. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.
 
using ExceptionPtr = System::SmartPtr<Details_Exception>
 Type alias used by exception wrappers.
 
using Exception = ExceptionWrapper<Details_Exception>
 Alias to be used instead of Details::Exception.
 
typedef SharedPtr< IAsyncResultIAsyncResultPtr
 Shared pointer to IAsyncResult.
 
template<class T >
using MakeConstRef_t = typename MakeConstRef<T>::type
 Helper type for MakeConstRef modifier.
 
template<class T >
using Predicate = MulticastDelegate<bool(T)>
 Represents a pointer to a predicate - an invokable entity that accepts a single argument and returns a bool value.
 
template<typename T >
using ArrayPtr = SmartPtr<Array<T>>
 Alias for 'pointer to array' type.
 
typedef SharedPtr< StringComparerStringComparerPtr
 An alias for a shared pointer to an instance of StringComparer class.
 
typedef SharedPtr< TimeZoneTimeZonePtr
 Shared pointer to an instance of TimeZone class.
 
typedef SharedPtr< TimeZoneInfoTimeZoneInfoPtr
 Alias for shared pointer to an instance of TimeZoneInfo class.
 

Enumerations

enum class  Base64FormattingOptions { None = 0 , InsertLineBreaks = 1 }
 Enumeration containing values that represent different formats of base-64 encoded data. More...
 
enum class  DateTimeKind { Unspecified , Utc , Local }
 Enumeration values of which represent the kinds of date and time. More...
 
enum class  DayOfWeek : int {
  Sunday = 0 , Monday , Tuesday , Wednesday ,
  Thursday , Friday , Saturday
}
 Enumeration that represents a day of week. More...
 
enum  EnvironmentVariableTarget { Process = 0 , User = 1 , Machine = 2 }
 Specifies the environment variable location. More...
 
enum class  MidpointRounding { ToEven , AwayFromZero }
 Specifies the behavior of rounding functions. More...
 
enum class  PlatformID {
  Win32S = 0 , Win32Windows = 1 , Win32NT = 2 , WinCE = 3 ,
  Unix = 4 , Xbox = 5 , MacOSX = 6
}
 Represents an operating system platform. More...
 
enum class  SmartPtrMode : char { Shared , Weak }
 SmartPtr pointer type: weak or shared. Defines whether pointer is being counted when it is being decided whether to delete object or not. More...
 
enum class  StringSplitOptions { None = 0 , RemoveEmptyEntries = 1 }
 Determines string splitting behavior. More...
 
enum class  StringComparison {
  CurrentCulture = 0 , CurrentCultureIgnoreCase = 1 , InvariantCulture = 2 , InvariantCultureIgnoreCase = 3 ,
  Ordinal = 4 , OrdinalIgnoreCase = 5
}
 Defines string comparison style. More...
 
enum class  TypeCode {
  Empty = 0 , Object = 1 , DBNull = 2 , Boolean = 3 ,
  Char = 4 , SByte = 5 , Byte = 6 , Int16 = 7 ,
  UInt16 = 8 , Int32 = 9 , UInt32 = 10 , Int64 = 11 ,
  UInt64 = 12 , Single = 13 , Double = 14 , Decimal = 15 ,
  DateTime = 16 , String = 18
}
 Represents the type of an object. More...
 
enum class  UriKind { RelativeOrAbsolute = 0 , Absolute = 1 , Relative = 2 }
 Represents the kinds of URIs. More...
 
enum class  UriComponents {
  Scheme = 0x1 , UserInfo = 0x2 , Host = 0x4 , Port = 0x8 ,
  SchemeAndServer = Scheme | Host | Port , Path = 0x10 , Query = 0x20 , PathAndQuery = Path | Query ,
  HttpRequestUrl = Scheme | Host | Port | Path | Query , Fragment = 0x40 , AbsoluteUri = Scheme | UserInfo | Host | Port | Path | Query | Fragment , StrongPort = 0x80 ,
  HostAndPort = Host | StrongPort , StrongAuthority = UserInfo | Host | StrongPort , NormalizedHost = 0x100 , KeepDelimiter = 0x40000000 ,
  SerializationInfoString = static_cast<int32_t>(0x80000000)
}
 Represents URI components. More...
 
enum class  UriFormat { UriEscaped = 1 , Unescaped = 2 , SafeUnescaped = 3 }
 Specifies how the URI is escaped. More...
 
enum class  UriHostNameType {
  Unknown = 0 , Basic = 1 , Dns = 2 , IPv4 = 3 ,
  IPv6 = 4
}
 Represents the type of host name. More...
 
enum class  UriPartial { Scheme = 0 , Authority = 1 , Path = 2 , Query = 3 }
 Represents the parts of a URI for the Uri.GetLeftPart method. More...
 

Functions

template<typename T >
ArrayPtr< T > MakeArray (std::initializer_list< T > init)
 A factory function that constructs a new Array object, fills it with the elements from the specified initialization list and returns a smart pointer pointing to the Array object.
 
template<class T , class... Args>
ArrayPtr< T > MakeArray (Args &&... args)
 A factory function that constructs a new Array object passing the specified arguments to its constructor.
 
template<class T , class Integral , class... Args>
std::enable_if< std::is_integral< Integral >::value, ArrayPtr< T > >::type MakeArray (Integral size, Args &&... args)
 A factory function that constructs a new Array object passing the specified arguments to its constructor.
 
template<typename T >
bool operator== (ArraySegment< T > a, ArraySegment< T > b)
 
template<typename T >
bool operator!= (ArraySegment< T > a, ArraySegment< T > b)
 
constexpr bool operator== (std::nullptr_t, DateTime)
 
constexpr bool operator!= (std::nullptr_t, DateTime)
 
constexpr bool operator< (std::nullptr_t, DateTime)
 
constexpr bool operator<= (std::nullptr_t, DateTime)
 
constexpr bool operator> (std::nullptr_t, DateTime)
 
constexpr bool operator>= (std::nullptr_t, DateTime)
 
ASPOSECPP_SHARED_API void PrintTo (DateTime value, std::ostream *stream)
 Prints value to ostream. Mostly used for debug.
 
std::ostream & operator<< (std::ostream &stream, DateTime date_time)
 Insert data into the stream using UTF-8 encoding.
 
std::wostream & operator<< (std::wostream &stream, DateTime date_time)
 Insert data into the stream.
 
constexpr bool operator== (std::nullptr_t, const DateTimeOffset &)
 
constexpr bool operator!= (std::nullptr_t, const DateTimeOffset &)
 
constexpr bool operator< (std::nullptr_t, const DateTimeOffset &)
 
constexpr bool operator<= (std::nullptr_t, const DateTimeOffset &)
 
constexpr bool operator> (std::nullptr_t, const DateTimeOffset &)
 
constexpr bool operator>= (std::nullptr_t, const DateTimeOffset &)
 
ASPOSECPP_SHARED_API void PrintTo (DateTimeOffset value, std::ostream *stream)
 Prints value to ostream. Mostly used for debug.
 
std::ostream & operator<< (std::ostream &stream, DateTimeOffset value)
 Insert data into the stream using UTF-8 encoding.
 
std::wostream & operator<< (std::wostream &stream, DateTimeOffset value)
 Insert data into the stream.
 
auto operator- (DayOfWeek a, DayOfWeek b)
 Calculates the number of days between two days of week.
 
template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Decimal operator+ (const T &x, const Decimal &d)
 Returns a new instance of Decimal class that represents a value that is a sum of the specified value and the value represented by the specified Decimal object.
 
template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Decimal operator- (const T &x, const Decimal &d)
 Returns a new instance of Decimal class that represents a value that is the result of subtraction of the value represented by the specified Decimal object from the specified value.
 
template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Decimal operator* (const T &x, const Decimal &d)
 Returns a new instance of Decimal class that represents a value that is a result of multiplication of the specified value and the value represented by the specified Decimal object.
 
template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Decimal operator/ (const T &x, const Decimal &d)
 Returns a new instance of Decimal class that represents a value that is a result of division of the specified value and the value represented by the specified Decimal object.
 
ASPOSECPP_SHARED_API void PrintTo (const Decimal &d, ::std::ostream *os)
 Writes the value represented by the specified object to the specified output stream.
 
ASPOSECPP_SHARED_API std::ostream & operator<< (std::ostream &stream, const Decimal &decimal)
 Insert data into the stream using UTF-8 encoding.
 
ASPOSECPP_SHARED_API std::wostream & operator<< (std::wostream &stream, const Decimal &decimal)
 Insert data into the stream.
 
template<typename T >
std::enable_if< IsExceptionWrapper< T >::value, constT & >::type Default ()
 Returns the default-constructed instance of the specified type.
 
template<typename T >
std::enable_if<!IsExceptionWrapper< T >::value, constT & >::type Default ()
 Returns the default-constructed instance of the specified type.
 
template<typename T , typename F >
std::enable_if_t< Details::is_lambda_void_void< T >::value > DoTryFinally (T &&tryBlock, F &&finallyBlock)
 The sigle function that emulates behavior of C#'s try[-catch]-finally statement. During translation of C#'s try[-catch]-finally statement with translator's option finally_statement_as_lambda set to true, the statement is translated into the invocation of this method.
 
template<typename T , typename F >
std::enable_if_t< Details::is_lambda_void_boolref< T >::value, bool > DoTryFinally (T &&tryBlock, F &&finallyBlock)
 The sigle function that emulates behavior of C#'s try[-catch]-finally statement. During translation of C#'s try[-catch]-finally statement with translator's option finally_statement_as_lambda set to true, the statement is translated into the invocation of this method. This overload handles the case in which the return value of the function object that implements the try[-catch] part of the try[-catch]-finally statement is bool.
 
template<typename T , typename F >
std::enable_if_t< Details::is_lambda_nonovoid_boolref< T >::value, std::optional< Details::ResultOf< T, bool & > > > DoTryFinally (T &&tryBlock, F &&finallyBlock)
 The sigle function that emulates behavior of C#'s try[-catch]-finally statement. During translation of C#'s try[-catch]-finally statement with translator's option finally_statement_as_lambda set to true, the statement is translated into the invocation of this method. This overload handles the case in which the return value of the function object that implements the try[-catch] part of the try[-catch]-finally statement is bool&.
 
template<typename T , SmartPtrMode trunkMode, unsigned int ... weakLeafs>
DynamicWeakPtr< T, trunkMode, weakLeafs... >::Reference Ref (DynamicWeakPtr< T, trunkMode, weakLeafs... > &ptr)
 Creates reference to DynamicWeakPtr object. Used by translator when passing function arguments by reference.
 
template<typename T >
decltype(Ref(std::declval< T & >())) Ref (const std::reference_wrapper< T > &wrapper)
 Wrapper to make sure Ref(std::ref(DynamicWeakPtr)) works.
 
template<typename T , typename Enumerable >
std::enable_if_t<!Details::IsIterable< Enumerable >::value, Details::EnumeratorAdapter< Enumerable, T > > IterateOver (System::SmartPtr< Enumerable > enumerable)
 This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable without begin(), end() methods with target type argument for (auto& value : IterateOver<SomeType>(enumerable))
 
template<typename Enumerable >
std::enable_if_t<!Details::IsIterable< Enumerable >::value, Details::EnumeratorAdapter< Enumerable > > IterateOver (System::SmartPtr< Enumerable > enumerable)
 This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable without begin(), end() methods with default target type argument for (auto& value : IterateOver(enumerable)) analog to the following C# code foreach (var value in enumerable)
 
template<typename Enumerable >
std::enable_if_t< Details::IsIterable< Enumerable >::value, System::SmartPtr< Enumerable > > IterateOver (System::SmartPtr< Enumerable > enumerable)
 This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable with begin(), end() methods with default target type argument for (auto& value : IterateOver(enumerable))
 
template<typename T , typename Enumerable >
std::enable_if_t< Details::IsIterable< Enumerable >::value &&std::is_same< typename Details::ReturnTypeTrait< T >::ReturnType, Details::IterableValueType< Enumerable > >::value, System::SmartPtr< Enumerable > > IterateOver (System::SmartPtr< Enumerable > enumerable)
 This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable with begin(), end() methods with target type same as original value_type of iterator.
 
template<typename T , typename Enumerable >
std::enable_if_t< Details::IsIterable< Enumerable >::value &&!std::is_same< typename Details::ReturnTypeTrait< T >::ReturnType, Details::IterableValueType< Enumerable > >::value, Details::CppIteratorAdapter< Enumerable, T > > IterateOver (System::SmartPtr< Enumerable > enumerable)
 This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable with begin(), end() methods with different target type and original value_type of iterator.
 
template<typename Enumerable >
std::enable_if_t<!IsSmartPtr< Enumerable >::value, Details::EnumeratorAdapter< Enumerable, Details::ValueTypeOfEnumerable< Enumerable >, Enumerable * > > IterateOver (const Enumerable *enumerable)
 This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable this with default target type.
 
template<typename T , typename Enumerable >
std::enable_if_t<!IsSmartPtr< Enumerable >::value, Details::EnumeratorAdapter< Enumerable, T, Enumerable * > > IterateOver (const Enumerable *enumerable)
 This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable without begin(), end() methods with target type argument for (auto& value : IterateOver<SomeType>(enumerable))
 
ASPOSECPP_SHARED_API void PrintTo (const Details_Exception &exception, std::ostream *stream)
 Prints value to ostream. Mostly used for debug.
 
template<typename T >
void PrintTo (const ExceptionWrapper< T > &exception_wrapper, std::ostream *stream)
 Prints value to ostream. Mostly used for debug.
 
std::ostream & operator<< (std::ostream &stream, const Exception &exception)
 Insert data into the stream using UTF-8 encoding.
 
std::wostream & operator<< (std::wostream &stream, const Exception &exception)
 Insert data into the stream.
 
template<typename T >
std::enable_if< std::is_scalar< T >::value, int >::type GetHashCode (const T &obj)
 Returns a hash code for the specified scalar value.
 
template<typename T >
std::enable_if<!std::is_scalar< T >::value &&System::IsSmartPtr< T >::value, int >::type GetHashCode (const T &obj)
 Returns a hash code for the specified object.
 
template<typename T >
std::enable_if< System::IsExceptionWrapper< T >::value, int >::type GetHashCode (const T &obj)
 Returns a hash code for the specified object which is exception.
 
template<typename T >
std::enable_if<!std::is_scalar< T >::value &&!System::IsSmartPtr< T >::value &&!System::IsExceptionWrapper< T >::value, int >::type GetHashCode (const T &obj)
 Returns a hash code for the specified object which is not a smart pointer nor exception.
 
template<>
int GetHashCode (const std::thread::id &id)
 Specialization for std::thread::id; Returns the hash code for the specified thread object.
 
ASPOSECPP_SHARED_API void PrintTo (const Guid &value, std::ostream *stream)
 Prints value to ostream. Mostly used for debug.
 
std::ostream & operator<< (std::ostream &stream, const Guid &guid)
 Insert data into the stream using UTF-8 encoding.
 
std::wostream & operator<< (std::wostream &stream, const Guid &guid)
 Insert data into the stream.
 
template<typename T >
MulticastDelegate< T > operator+ (MulticastDelegate< T > lhv, MulticastDelegate< T > rhv)
 Connects all callbacks from right hand delegate to the end of left hand delegate callback list.
 
template<typename T >
MulticastDelegate< T > operator- (MulticastDelegate< T > lhv, MulticastDelegate< T > rhv)
 Disconnects all callbacks in right hand delegate from the end of left hand delegate callback list.
 
template<typename T >
bool operator== (std::nullptr_t, const Nullable< T > &other)
 Determines if the specified Nullable object represents a value that is equal to null.
 
template<typename T >
bool operator!= (std::nullptr_t, const Nullable< T > &other)
 Determines if the specified Nullable object represents a value that is not equal to null.
 
template<typename T >
bool operator> (std::nullptr_t, const Nullable< T > &)
 Always returns false.
 
template<typename T >
bool operator< (std::nullptr_t, const Nullable< T > &)
 Always returns false.
 
template<typename T >
bool operator>= (std::nullptr_t, const Nullable< T > &)
 Always returns false.
 
template<typename T >
bool operator<= (std::nullptr_t, const Nullable< T > &)
 Always returns false.
 
template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value, bool >::type operator== (const T1 &some, const Nullable< T2 > &other)
 Determines if the specified value is equal to the value represented by the specified Nullable object by applying operator==() to these values.
 
template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value, bool >::type operator!= (const T1 &some, const Nullable< T2 > &other)
 Determines if the specified value is not equal to the value represented by the specified Nullable object by applying operator!=() to these values.
 
template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value, bool >::type operator> (const T1 &some, const Nullable< T2 > &other)
 Determines if the specified value is greater than the value represented by the specified Nullable object by applying operator>() to these values.
 
template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value, bool >::type operator< (const T1 &some, const Nullable< T2 > &other)
 Determines if the specified value is less than the value represented by the specified Nullable object by applying operator<() to these values.
 
template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value, bool >::type operator>= (const T1 &some, const Nullable< T2 > &other)
 Determines if the specified value is greater or equal to the value represented by the specified Nullable object by applying operator>=() to these values.
 
template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value, bool >::type operator<= (const T1 &some, const Nullable< T2 > &other)
 Determines if the specified value is less or equal to the value represented by the specified Nullable object by applying operator<=() to these values.
 
template<typename T1 , typename T2 , typename = typename std::enable_if<!IsNullable<T1>::value && !IsNullable<T2>::value && !std::is_same<T1, System::String>::value, int>::type>
auto operator+ (const T1 &some, const Nullable< T2 > &other) -> System::Nullable< decltype(some+other.get_Value())>
 Sums non-nullable and nullable values.
 
template<typename T1 , typename T2 , typename = typename std::enable_if<!IsNullable<T1>::value && !IsNullable<T2>::value && !std::is_same<T1, System::String>::value, int>::type>
auto operator- (const T1 &some, const Nullable< T2 > &other) -> System::Nullable< decltype(some - other.get_Value())>
 Subtracts non-nullable and nullable values.
 
template<typename T >
void PrintTo (const Nullable< T > &value, std::ostream *stream)
 Prints value to ostream. Mostly used for debug.
 
template<typename T >
std::ostream & operator<< (std::ostream &stream, const Nullable< T > &value)
 Insert data into the stream using UTF-8 encoding.
 
template<typename T >
std::wostream & operator<< (std::wostream &stream, const Nullable< T > &value)
 Insert data into the stream.
 
template<typename TTo , typename TFrom >
std::enable_if<!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type Cast_noexcept (SmartPtr< TFrom > const &obj)
 Performs cast on SmartPtr objects.
 
template<typename TTo , typename TFrom >
std::enable_if<!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type Cast (SmartPtr< TFrom > const &obj)
 Performs cast on SmartPtr objects.
 
template<typename TTo , typename TFrom >
std::enable_if< IsExceptionWrapper< TFrom >::value &&IsExceptionWrapper< TTo >::value &&(std::is_convertible< TTo, TFrom >::value||std::is_base_of< TTo, TFrom >::value), TTo >::type DynamicCast_noexcept (const TFrom &obj) noexcept
 Old obsolete casts. Will be removed in future versions.
 
template<typename TTo , typename TFrom >
std::enable_if< IsExceptionWrapper< TFrom >::value &&IsExceptionWrapper< TTo >::value &&(std::is_convertible< TTo, TFrom >::value||std::is_base_of< TTo, TFrom >::value), TTo >::type DynamicCast (const TFrom &obj)
 Performs dynamic cast on Exception objects.
 
template<typename TTo , typename TFrom >
std::enable_if<!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type StaticCast_noexcept (SmartPtr< TFrom > const &obj)
 Performs static cast on SmartPtr objects.
 
template<typename TTo , typename TFrom >
std::enable_if<!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type StaticCast (SmartPtr< TFrom > const &obj)
 Performs static cast on SmartPtr objects.
 
template<typename TTo , typename TFrom >
CastResult< TTo >::type StaticCast_noexcept (WeakPtr< TFrom > const &obj)
 Performs static cast on WeakPtr objects.
 
template<typename TTo , typename TFrom >
CastResult< TTo >::type StaticCast (WeakPtr< TFrom > const &obj)
 Performs static cast on WeakPtr objects.
 
template<typename TTo >
CastResult< TTo >::type StaticCast (std::nullptr_t)
 Performs static cast of null objects.
 
template<typename TTo , typename TFrom >
std::enable_if< std::is_arithmetic< TFrom >::value, TTo >::type StaticCast (TFrom value)
 Specialization for arithmetic types.
 
template<typename TTo >
std::enable_if< std::is_same< TTo, System::String >::value, TTo >::type StaticCast (TTo value)
 Process cast from String to String.
 
template<typename TTo , typename TFrom >
std::enable_if< std::is_arithmetic< TFrom >::value, TTo >::type StaticCast (const TFrom *value)
 Specialization for arithmetic types.
 
template<typename TTo , typename TFrom >
std::enable_if<!std::is_same< TFrom, System::String >::value &&!IsExceptionWrapper< TFrom >::value &&!IsSmartPtr< TFrom >::value &&!std::is_arithmetic< TFrom >::value, TTo >::type StaticCast (const TFrom &obj)
 Performs static cast on non-pointer objects.
 
template<typename TTo , typename TFrom >
std::enable_if<!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type DynamicCast_noexcept (SmartPtr< TFrom > const &obj) noexcept
 Performs dynamic cast on SmartPtr objects.
 
template<typename TTo , typename TFrom >
std::enable_if< IsExceptionWrapper< TFrom >::value &&IsExceptionWrapper< TTo >::value &&(std::is_convertible< TTo, TFrom >::value||std::is_base_of< TTo, TFrom >::value), TTo >::type StaticCast_noexcept (const TFrom &obj)
 Performs static cast on Exception objects.
 
template<typename TTo , typename TFrom >
std::enable_if< IsExceptionWrapper< TFrom >::value &&IsExceptionWrapper< TTo >::value &&(std::is_convertible< TTo, TFrom >::value||std::is_base_of< TTo, TFrom >::value), TTo >::type StaticCast (const TFrom &obj)
 Performs static cast on Exception objects.
 
template<typename TTo , typename TFrom >
std::enable_if<!std::is_enum< TTo >::value &&!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type DynamicCast (SmartPtr< TFrom > const &obj)
 Performs dynamic cast on SmartPtr objects.
 
template<typename TTo , typename TFrom >
std::enable_if< std::is_enum< TTo >::value, TTo >::type DynamicCast (SmartPtr< TFrom > obj)
 Unboxes boxed enum via cast.
 
template<typename TTo >
CastResult< TTo >::type DynamicCast (std::nullptr_t) noexcept
 Performs dynamic cast of null objects.
 
template<typename TTo , typename TFrom >
std::enable_if<!IsExceptionWrapper< TFrom >::value &&!IsSmartPtr< TFrom >::value &&std::is_convertible< TTo, TFrom >::value, TTo >::type DynamicCast (TFrom &obj)
 Performs dynamic cast on non-pointer objects.
 
template<typename TTo , typename TFrom >
std::enable_if< std::is_same< System::Object, TFrom >::value &&IsExceptionWrapper< TTo >::value, TTo >::type StaticCast_noexcept (SmartPtr< TFrom > obj) noexcept
 Performs static cast on Objects to Exception objects.
 
template<typename TTo , typename TFrom >
std::enable_if< std::is_same< System::Object, TFrom >::value &&IsExceptionWrapper< TTo >::value, TTo >::type StaticCast (SmartPtr< TFrom > obj) noexcept
 Performs static cast on Objects to Exception objects.
 
template<typename TTo , typename TFrom >
std::enable_if< std::is_same< System::Object, TFrom >::value &&IsExceptionWrapper< TTo >::value, TTo >::type DynamicCast_noexcept (SmartPtr< TFrom > obj) noexcept
 Performs dynamic cast on Objects to Exception objects.
 
template<typename TTo , typename TFrom >
std::enable_if< std::is_same< System::Object, TFrom >::value &&IsExceptionWrapper< TTo >::value, TTo >::type DynamicCast (SmartPtr< TFrom > obj)
 Performs dynamic cast on Objects to Exception objects.
 
template<typename TTo , typename TFrom >
std::enable_if< std::is_pointer< TTo >::value &&std::is_same< IntPtr, TFrom >::value, TTo >::type DynamicCast (TFrom value) noexcept
 Performs dynamic cast from IntPtr to pointer.
 
template<typename TTo , typename TFrom >
CastResult< TTo >::type ConstCast (const SmartPtr< TFrom > &obj)
 End of deprecated casts.
 
template<typename TTo , typename TFrom >
CastResult< TTo >::type ForceStaticCast (SmartPtr< TFrom > const &obj)
 Performs real static cast on SmartPtr objects.
 
template<typename T >
SmartPtr< ObjectMemberwiseClone (T *ptr)
 Performs memberwise cloning using copy constructor.
 
ASPOSECPP_SHARED_API void PrintTo (const System::Object &value, std::ostream *stream)
 Prints value to ostream. Mostly used for debug.
 
ASPOSECPP_SHARED_API std::ostream & operator<< (std::ostream &stream, const System::Object &object)
 Insert data into the stream using UTF-8 encoding.
 
ASPOSECPP_SHARED_API std::wostream & operator<< (std::wostream &stream, const System::Object &object)
 Insert data into the stream.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::None, Result > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used when the source and the result types are the same.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Static, Result > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used when simple constructor-like cast is needed.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Exception, Result > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used for exception wrappers.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::ObjectToException, Result > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used for casting object to exception.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Pointer, typename CastResult< Result >::type > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used when the source and result both are smart pointers (without expicit SmartPtr<...> in result type).
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::RawPointer, typename CastResult< std::remove_pointer_t< Result > >::type > ExplicitCast (Source value)
 Casts the source type to the result type using explicit cast. Used when the casting raw pointer to smart pointer.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::PointerToPointer, Result > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used when the source and result both are smart pointers (with expicit SmartPtr<...> in result type).
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::UnboxingToNullable, Result > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used for unboxing object to nullable.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::NullableBoxing, Result > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used to box nullable.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::NullableUnboxing, Result > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used for unboxing nullable object.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::EnumBoxing, SmartPtr< BoxedValueBase > > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used for enum boxing.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Boxing, typename CastResult< Result >::type > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used for common boxing.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::StringBoxing, typename CastResult< Result >::type > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used for System::String boxing.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Unboxing, Result > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used for common unboxing.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Null, typename CastResult< Result >::type > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used for nullptr casting.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Array, typename CastResult< Result >::type > ExplicitCast (const Source &value)
 Casts the source type to the result type using explicit cast. Used for casting between arrays.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Static, Result > AsCast (const Source &value)
 Casts the source type to the result type using 'as' operator cast. Used when simple constructor-like cast is needed.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::None, Result > AsCast (const Source &value)
 Casts the source type to the result type using 'as' operator cast. Used when the source and the result types are the same.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Exception, Result > AsCast (const Source &value)
 Casts the source type to the result type using 'as' operator cast. Used for exception wrappers.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::ObjectToException, Result > AsCast (const Source &value)
 Casts the source type to the result type using 'as' operator cast. Used for casting object to exception.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Pointer, typename CastResult< Result >::type > AsCast (const Source &value)
 Casts the source type to the result type using 'as' operator cast. Used when the source and result both are smart pointers.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::PointerToPointer, Result > AsCast (const Source &value)
 Casts the source type to the result type using 'as' operator cast. Used when the source and result both are smart pointers (with expicit SmartPtr<...> in result type).
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::UnboxingToNullable, Result > AsCast (const Source &value)
 Casts the source type to the result type using 'as' operator cast. Used for unboxing object to nullable.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::NullableBoxing, Result > AsCast (const Source &value)
 Casts the source type to the result type using 'as' operator cast. Used for boxing nullable object.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Boxing, typename CastResult< Result >::type > AsCast (const Source &value)
 Casts the source type to the result type using 'as' operator cast. Used for boxing common object.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::UnboxingToString, Result > AsCast (const Source &value)
 Casts the source type to the result type using 'as' operator cast. Used for string unboxing.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Null, typename CastResult< Result >::type > AsCast (const Source &value)
 Casts the source type to the result type using 'as' operator cast. Used for nullptr casing.
 
template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Array, typename CastResult< Result >::type > AsCast (const Source &value)
 Casts the source type to the result type using 'as' operator cast. Used to cast between arrays.
 
template<>
const System::TypeInfoObjectType::GetType< System::String > ()
 Implements typeof() translation. Overload for String.
 
template<>
const System::TypeInfoObjectType::GetType< System::DateTime > ()
 Implements typeof() translation. Overload for DateTime.
 
std::ostream & operator<< (std::ostream &stream, const OperatingSystem &os)
 Insert data into the stream using UTF-8 encoding.
 
std::wostream & operator<< (std::wostream &stream, const OperatingSystem &os)
 Insert data into the stream.
 
template<typename TA , typename TB >
bool Equals (const TA &a, const TB &b)
 Determines the equality of two values applying operator==() to them.
 
template<>
bool Equals< float, float > (const float &a, const float &b)
 Specialization for single-precision floating point values. Although two floating point NaNs are defined by IEC 60559:1989 to always compare as unequal, the contract for System.Object.Equals, requires that overrides must satisfy the requirements for an equivalence operator. Therefore, System.Double.Equals and System.Single.Equals return True when comparing two NaNs, while the equality operator returns False in that case, as required by the standard.
 
template<>
bool Equals< double, double > (const double &a, const double &b)
 Specialization for double-precision floating point values.
 
template<typename TA , typename TB >
std::enable_if_t<!std::is_floating_point< TA >::value &&!std::is_floating_point< TB >::value, int > Compare (const TA &a, const TB &b)
 Compares two values.
 
template<typename TA , typename TB >
std::enable_if_t< std::is_floating_point< TA >::value &&std::is_floating_point< TB >::value, int > Compare (const TA &a, const TB &b)
 Compares two floating point values.
 
template<typename T >
bool IsNaN (const T &value)
 Determines if the specified value is Not-A-Number value.
 
template<typename T >
bool IsInfinity (const T &value)
 Determines if the specified value represents infinity.
 
template<typename T >
bool IsPositiveInfinity (const T &value)
 Determines if the specified value represents positive infinity.
 
template<typename T >
bool IsNegativeInfinity (const T &value)
 Determines if the specified value represents negative infinity.
 
template<typename TTo , typename TFrom >
TTo CheckedCast (TFrom value)
 Determines if the specified value falls into the range of values of type TTo and if it does casts it to the type TTo.
 
template<typename F >
ScopeGuard< F > MakeScopeGuard (F f)
 A factory function that creates instances of ScopedGuard class.
 
template<typename T , typename T2 >
setter_wrap (void(*pSetter)(T2), T value)
 Overload for static setter functions with type conversion.
 
template<typename T , typename T2 , typename Host , typename HostSet >
std::enable_if< std::is_base_of< HostSet, Host >::value, T >::type setter_wrap (Host *const host, void(HostSet::*pSetter)(T2), T value)
 Overload for instance setter functions with type conversion.
 
template<typename T >
setter_increment_wrap (T(*pGetter)(), void(*pSetter)(T))
 Translator translates C#'s increment expressions targeting class' property that has setter and getter defined, into invocation of this function.
 
template<typename T , typename Host , typename HostGet , typename HostSet >
std::enable_if< std::is_base_of< HostGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type setter_increment_wrap (Host *const host, T(HostGet::*pGetter)(), void(HostSet::*pSetter)(T))
 Translator translates C#'s increment expressions targeting class' property that has setter and getter defined, into invocation of this function.
 
template<typename T >
setter_post_increment_wrap (T(*pGetter)(), void(*pSetter)(T))
 Translator translates C#'s post-increment expressions targeting class' property that has setter and getter defined, into invocation of this function.
 
template<typename T , typename Host , typename HostGet , typename HostSet >
std::enable_if< std::is_base_of< HostGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type setter_post_increment_wrap (Host *const host, T(HostGet::*pGetter)(), void(HostSet::*pSetter)(T))
 Translator translates C#'s post-increment expressions targeting instance's property that has setter and getter defined, into invocation of this function (overload for non-const getter).
 
template<typename T , typename Host , typename HostConstGet , typename HostSet >
std::enable_if< std::is_base_of< HostConstGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type setter_post_increment_wrap (Host *const host, T(HostConstGet::*pGetter)() const, void(HostSet::*pSetter)(T))
 Translator translates C#'s post-increment expressions targeting instance's property that has setter and getter defined, into invocation of this function (overload for const getter).
 
template<typename T >
setter_decrement_wrap (T(*pGetter)(), void(*pSetter)(T))
 Translator translates C#'s pre-decrement expressions targeting class' property that has setter and getter defined, into invocation of this function.
 
template<typename T , typename Host , typename HostGet , typename HostSet >
std::enable_if< std::is_base_of< HostGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type setter_decrement_wrap (Host *const host, T(HostGet::*pGetter)(), void(HostSet::*pSetter)(T))
 Translator translates C#'s pre-decrement expressions targeting instance's property that has setter and getter defined, into invocation of this function (overload for non-const getter).
 
template<typename T , typename Host , typename HostConstGet , typename HostSet >
std::enable_if< std::is_base_of< HostConstGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type setter_decrement_wrap (Host *const host, T(HostConstGet::*pGetter)() const, void(HostSet::*pSetter)(T))
 Translator translates C#'s pre-decrement expressions targeting instance's property that has setter and getter defined, into invocation of this function (overload for const getter).
 
template<typename T >
setter_post_decrement_wrap (T(*pGetter)(), void(*pSetter)(T))
 Translator translates C#'s post-decrement expressions targeting class' property that has setter and getter defined, into invocation of this function.
 
template<typename T , typename Host , typename HostGet , typename HostSet >
std::enable_if< std::is_base_of< HostGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type setter_post_decrement_wrap (Host *const host, T(HostGet::*pGetter)(), void(HostSet::*pSetter)(T))
 Translator translates C#'s post-decrement expressions targeting instance's property that has setter and getter defined, into invocation of this function (overload for non-const getter).
 
template<typename T , typename Host , typename HostConstGet , typename HostSet >
std::enable_if< std::is_base_of< HostConstGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type setter_post_decrement_wrap (Host *const host, T(HostConstGet::*pGetter)() const, void(HostSet::*pSetter)(T))
 Translator translates C#'s post-decrement expressions targeting instance's property that has setter and getter defined, into invocation of this function (overload for const getter).
 
template<class T , class ... Args>
std::enable_if<!IsSmartPtr< T >::value, SmartPtr< T > >::type MakeObject (Args &&... args)
 Creates object on heap and returns shared pointer to it.
 
template<class T , class ... Args>
std::enable_if< IsSmartPtr< T >::value, T >::type MakeObject (Args &&... args)
 Creates object on heap and returns shared pointer to it.
 
template<class X , class Y >
bool operator== (const SmartPtr< X > &x, const SmartPtr< Y > &y)
 Equal-compares two smart pointers.
 
template<class X , class Y >
bool operator!= (const SmartPtr< X > &x, const SmartPtr< Y > &y)
 Non-equal-compares two smart pointers.
 
template<class X >
bool operator== (std::nullptr_t, SmartPtr< X > const &x)
 Checks if smart pointer is null.
 
template<class X >
bool operator!= (SmartPtr< X > const &x, std::nullptr_t)
 Checks if smart pointer is not null.
 
template<class X >
bool operator!= (std::nullptr_t, SmartPtr< X > const &x)
 Checks if smart pointer is not null.
 
template<class X , class Y >
std::enable_if< std::is_base_of< Object, Y >::value &&detail::has_no_operator_equal< X, Y >::value, bool >::type operator== (const SmartPtr< X > &x, const Y *y)
 Equality comparison smart pointer against simple (C) pointer.
 
template<class X , class Y >
std::enable_if< std::is_base_of< Object, Y >::value &&detail::has_no_operator_equal< X, Y >::value, bool >::type operator!= (const SmartPtr< X > &x, const Y *y)
 Inequality comparison smart pointer against simple (C) pointer.
 
template<class X , class Y >
std::enable_if< std::is_base_of< Object, X >::value &&detail::has_no_operator_equal< X, Y >::value, bool >::type operator== (const X *x, const SmartPtr< Y > &y)
 Equality comparison smart pointer against simple (C) pointer.
 
template<class X , class Y >
std::enable_if< std::is_base_of< Object, X >::value &&detail::has_no_operator_equal< X, Y >::value, bool >::type operator!= (const X *x, const SmartPtr< Y > &y)
 Equality comparison smart pointer against simple (C) pointer.
 
template<class T >
std::enable_if<!std::is_scalar< T >::value &&!std::is_pointer< T >::value &&!std::is_array< T >::value &&detail::has_method_is_null< T >::value, bool >::type operator== (T const &x, std::nullptr_t)
 Checks if value type object (translated C# structure, etc.) is null.
 
template<class T >
std::enable_if<!std::is_scalar< T >::value &&!std::is_pointer< T >::value &&!std::is_array< T >::value &&detail::has_method_is_null< T >::value, bool >::type operator== (std::nullptr_t, T const &x)
 Checks if value type object (translated C# structure, etc.) is null.
 
template<class X >
SmartPtr< X > MakeSharedPtr (X *p)
 Converts raw pointer to smart pointer.
 
template<class X >
SmartPtr< X > MakeSharedPtr (const X *p)
 Converts raw pointer to smart pointer. Overload for const pointers. Useful e. g. when using 'this' variable in C# methods translated as const.
 
template<class Y , class X >
SmartPtr< Y > static_pointer_cast (SmartPtr< X > const &x)
 Casts smart pointers using static_cast.
 
template<class Y , class X >
SmartPtr< Y > dynamic_pointer_cast (SmartPtr< X > const &x)
 Casts smart pointers using dynamic_cast.
 
template<class Y , class X >
SmartPtr< Y > const_pointer_cast (SmartPtr< X > const &x)
 Casts smart pointers using const_cast.
 
template<class T >
T * get_pointer (System::SmartPtr< T > const &x)
 Gets referenced object of smart pointer.
 
template<typename T >
T & Ref (T &value)
 Helper function to acquire references to objects. Used to guarantee that System::DynamicWeakPtr updates referenced object after assignments.
 
template<typename T >
std::enable_if_t< detail::has_print_to_function< T >::value, void > PrintTo (const SmartPtr< T > &object_ptr, std::ostream *stream)
 Prints value to ostream. Mostly used for debug.
 
template<typename T >
std::enable_if_t<!detail::has_print_to_function< T >::value, void > PrintTo (const SmartPtr< T > &object_ptr, std::ostream *stream)
 Prints value to ostream. Mostly used for debug.
 
template<typename T >
std::ostream & operator<< (std::ostream &stream, const SharedPtr< T > &object_ptr)
 Insert data into the stream using UTF-8 encoding.
 
template<typename T >
std::wostream & operator<< (std::wostream &stream, const SharedPtr< T > &object_ptr)
 Insert data into the stream.
 
template<class To , class From >
std::enable_if<!System::detail::has_method_get_Count< From >::value, Collections::Generic::ListPtr< To > >::type CastEnumerableTo (const From &enumerable)
 Performs the explicit casting of elements of the specified enumerable object to different type.
 
template<class To , class From >
std::enable_if< System::detail::has_method_get_Count< From >::value, Collections::Generic::ListPtr< To > >::type CastEnumerableTo (const From &enumerable)
 Performs the explicit casting of elements of the specified enumerable object to different type.
 
template<typename To , typename From >
std::enable_if_t< System::IsSmartPtr< From >::value, System::SharedPtr< System::Array< To > > > StaticCastArray (const System::SharedPtr< System::Array< From > > &from)
 Performs casting of elements of the specified array to different type. Override for cases then From is SmartPtr obj.
 
template<typename To , typename From >
std::enable_if_t<!System::IsSmartPtr< From >::value &&System::IsBoxable< From >::value &&std::is_same< To, System::SharedPtr< Object > >::value, System::SharedPtr< System::Array< To > > > StaticCastArray (const System::SharedPtr< System::Array< From > > &from)
 Performs casting of elements of the specified array to different type. Override for cases then From is Boxable and To is Object[].
 
template<class To , class From >
SharedPtr< Array< To > > DynamicCastArray (const SharedPtr< Array< From > > &from)
 Performs casting of elements of the specified array to different type.
 
template<typename T >
std::enable_if< IsStringLiteral< T, char_t >::value, String >::type operator+ (T &left, const String &right)
 String concatenation.
 
template<typename T >
std::enable_if< IsStringPointer< T, char_t >::value, String >::type operator+ (T &left, const String &right)
 String concatenation.
 
String operator+ (const char_t left, const String &right)
 String concatenation.
 
template<class Chars , typename std::enable_if< IsStringLiteral< Chars, char_t >::value >::type * = nullptr>
bool operator== (Chars &left, const String &right)
 String comparison.
 
template<class T , typename std::enable_if< IsStringPointer< T, char_t >::value >::type * = nullptr>
bool operator== (T &left, const String &right)
 String comparison.
 
template<class Chars , typename std::enable_if< IsStringLiteral< Chars, char_t >::value >::type * = nullptr>
bool operator!= (Chars &left, const String &right)
 String comparison.
 
template<class T , typename std::enable_if< IsStringPointer< T, char_t >::value >::type * = nullptr>
bool operator!= (T &left, const String &right)
 String comparison.
 
ASPOSECPP_SHARED_API bool operator== (const SharedPtr< Object > &left, const String &right)
 Object and string comparison.
 
ASPOSECPP_SHARED_API bool operator!= (const SharedPtr< Object > &left, const String &right)
 Object and string comparison.
 
ASPOSECPP_SHARED_API bool operator== (std::nullptr_t, const String &str)
 Checks if string is null.
 
ASPOSECPP_SHARED_API bool operator!= (std::nullptr_t, const String &str)
 Checks if string is null.
 
ASPOSECPP_SHARED_API std::ostream & operator<< (std::ostream &os, const String &str)
 Outputs a string to the output stream using UTF-8 encoding.
 
ASPOSECPP_SHARED_API std::wostream & operator<< (std::wostream &os, const String &str)
 Outputs a string to the output stream.
 
ASPOSECPP_SHARED_API std::istream & operator>> (std::istream &in, String &str)
 Gets a string from the input streamusing UTF-8 encoding.
 
ASPOSECPP_SHARED_API std::wistream & operator>> (std::wistream &in, String &str)
 Gets a string from the input stream.
 
ASPOSECPP_SHARED_API void PrintTo (const System::String &value, std::ostream *os)
 Prints string to ostream. Mostly used for debug.
 
constexpr bool operator== (std::nullptr_t, TimeSpan)
 
constexpr bool operator!= (std::nullptr_t, TimeSpan)
 
constexpr bool operator< (std::nullptr_t, TimeSpan)
 
constexpr bool operator<= (std::nullptr_t, TimeSpan)
 
constexpr bool operator> (std::nullptr_t, TimeSpan)
 
constexpr bool operator>= (std::nullptr_t, TimeSpan)
 
ASPOSECPP_SHARED_API void PrintTo (TimeSpan value, std::ostream *stream)
 Prints value to ostream. Mostly used for debug.
 
std::ostream & operator<< (std::ostream &stream, TimeSpan time_span)
 Insert data into the stream using UTF-8 encoding.
 
std::wostream & operator<< (std::wostream &stream, TimeSpan time_span)
 Insert data into the stream.
 
ASPOSECPP_SHARED_API std::ostream & operator<< (std::ostream &stream, const TypeInfo &type_info)
 Insert data into the stream using UTF-8 encoding.
 
ASPOSECPP_SHARED_API std::wostream & operator<< (std::wostream &stream, const TypeInfo &type_info)
 Insert data into the stream.
 
ASPOSECPP_SHARED_API bool operator== (const SharedPtr< Uri > &uri1, const SharedPtr< Uri > &uri2)
 Determines if the URIs represented by the current and specified objects are equal.
 
ASPOSECPP_SHARED_API bool operator!= (const SharedPtr< Uri > &uri1, const SharedPtr< Uri > &uri2)
 Determines if the URIs represented by the current and specified objects are not equal.
 
std::ostream & operator<< (std::ostream &stream, const Version &version)
 Insert data into the stream using UTF-8 encoding.
 
std::wostream & operator<< (std::wostream &stream, const Version &version)
 Insert data into the stream.
 
template<typename T >
void PrintTo (const WeakPtr< T > &object_ptr, std::ostream *stream)
 Prints value to ostream. Mostly used for debug.
 
template<typename T >
std::ostream & operator<< (std::ostream &stream, const WeakPtr< T > &object_ptr)
 Insert data into the stream using UTF-8 encoding.
 
template<typename T >
std::wostream & operator<< (std::wostream &stream, const WeakPtr< T > &object_ptr)
 Insert data into the stream.
 
bool is_vp_test (const ::testing::TestInfo *test_info)
 
std::string ForEachMemberGVName ()
 

Variables

template<typename T >
class ASPOSECPP_SHARED_CLASS Array
 
template<typename... Args>
class ASPOSECPP_SHARED_CLASS WeakReference
 Represents a weak reference, which references an object while still allowing that object to be deleted.
 

Typedef Documentation

◆ Action

template<class... Args>
using System::Action = MulticastDelegate<void(Args...)>

Delegate type that references methods that have no return value.

#include <system/action.h>
using namespace System;
// The function that prints the passed string.
void PrintString(const String &string)
{
using namespace std;
cout << string << endl;
}
int main()
{
// Create an instance of Action.
auto action = Action<String>(std::bind(&PrintString, std::placeholders::_1));
// Call the action.
action(u"Hello, world!");
return 0;
}
/*
This code example produces the following output:
Hello, world!
*/
String class used across the library. Is a substitute for C# System.String when translating code....
Definition string.h:122
Definition RijndaelCryptoProvider.h:13
MulticastDelegate< void(Args...)> Action
Delegate type that references methods that have no return value.
Definition action.h:40
Template Parameters
ArgsArgument list of the methods the delegate references.

◆ ArrayPtr

template<typename T >
using System::ArrayPtr = SmartPtr<Array<T>>

Alias for 'pointer to array' type.

Template Parameters
TArray element type.

◆ AsyncCallback

typedef MulticastDelegate< void(SharedPtr< IAsyncResult >)> System::AsyncCallback = System::MulticastDelegate<void(SharedPtr<IAsyncResult>)>

A delegate type that represents a method to be called when asynchronous operation completes.

◆ BadImageFormatException

using System::BadImageFormatException = System::ExceptionWrapper<Details_BadImageFormatException>

The exception that is thrown when the file image of a dynamic link library (DLL) or an executable program is invalid. Never wrap the BadImageFormatException class instances into System::SmartPtr.

◆ ByteArrayPtr

An alias for a smart pointer object that points to an array of unsigned 8-bit integers.

◆ Converter

template<class TInput , class TOutput >
using System::Converter = MulticastDelegate<TOutput(TInput)>

Represents a pointer to the invokable entity that accepts a single argument of the TInput type and returns a value of the TOutput type.

Template Parameters
TInputThe type of the argument accepted by the invokable entity pointed to by the delegate
TOutputThe type of the value returned by the invokable entity pointed to by the delegate

◆ DecoderFallbackBufferPtr

An alias for a smart pointer that points to an instance of System::Text::DecoderFallbackBuffer class.

◆ DecoderFallbackPtr

An alias for a smart pointer that points to an instance of System::Text::DecoderFallback class.

◆ DecoderPtr

An alias for a smart pointer that points to an instance of System::Text::Decoder class.

◆ DecoderReplacementFallbackPtr

◆ DirectoryInfoPtr

An alias for a smart pointer that points to an instance of System::IO::DirectoryInfo class.

◆ EncoderFallbackBufferPtr

An alias for a smart pointer that points to an instance of System::Text::EncoderFallbackBuffer class.

◆ EncoderFallbackPtr

An alias for a smart pointer that points to an instance of System::Text::EncoderFallback class.

◆ EncoderPtr

An alias for a smart pointer that points to an instance of System::Text::Encoder class.

◆ EncoderReplacementFallbackBufferPtr

◆ EncoderReplacementFallbackPtr

◆ EncodingInfoPtr

An alias for a smart pointer that points to an instance of System::Text::EncodingInfo class.

◆ EncodingPtr

An alias for a smart pointer that points to an instance of System::Text::Encoding class.

◆ Event

template<class... Args>
using System::Event = MulticastDelegate<Args...>

Represents an event - a mechanism through which subscribers are notified about an occurence of interest by means of a delegate invocation.

Template Parameters
ArgsThe types of arguments passed to the delegate when event is triggerreds.

◆ EventArgsPtr

Shared pointer to an instance of EventArgs class.

◆ EventHandler

template<class TEventArgs = SharedPtr<EventArgs>>
using System::EventHandler = MulticastDelegate<void(System::SharedPtr<Object>, TEventArgs)>

Represents a method that reacts to and processes an event. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.

Template Parameters
TEventArgsThe type of the argument that represents the context of the event

◆ Exception

using System::Exception = ExceptionWrapper<Details_Exception>

Alias to be used instead of Details::Exception.

◆ ExceptionPtr

using System::ExceptionPtr = System::SmartPtr<Details_Exception>

Type alias used by exception wrappers.

◆ FileInfoPtr

An alias for a smart pointer that points to an instance of System::IO::FileInfo class.

◆ FileStreamPtr

An alias for a smart pointer that points to an instance of System::IO::FileStream class.

◆ FileSystemInfoPtr

An alias for a smart pointer that points to an instance of System::IO::FileSystemInfo class.

◆ IAsyncResultPtr

◆ IFormatProviderPtr

An alias for a smart pointer that points to an instance of System::IFormatProvider class.

◆ MakeConstRef_t

template<class T >
using System::MakeConstRef_t = typename MakeConstRef<T>::type

Helper type for MakeConstRef modifier.

◆ MemoryStreamPtr

An alias for a smart pointer that points to an instance of System::IO::MemoryStream class.

◆ Predicate

template<class T >
using System::Predicate = MulticastDelegate<bool(T)>

Represents a pointer to a predicate - an invokable entity that accepts a single argument and returns a bool value.

#include "system/array.h"
#include "system/predicate.h"
#include <iostream>
int main()
{
// Fill the array.
auto arr = System::MakeArray<int>({-1, -123, 5, 3, 7});
// Create the predicate that returns an array element that is greater than 3.
const auto predicate = static_cast<System::Predicate<int>>([](int a) -> bool
{
return a > 3;
});
// Find the first element of the array using the created predicate and print it.
int firstItem = System::Array<int>::Find(arr, predicate);
std::cout << firstItem << std::endl;
return 0;
}
/*
This code example produces the following output:
5
*/
static T Find(System::ArrayPtr< T > arr, System::Predicate< T > match)
Searches for the first element in the specified array that satisfies the conditions of the specified ...
Definition array.h:762
ArrayPtr< T > MakeArray(std::initializer_list< T > init)
A factory function that constructs a new Array object, fills it with the elements from the specified ...
Definition array.h:138
MulticastDelegate< bool(T)> Predicate
Represents a pointer to a predicate - an invokable entity that accepts a single argument and returns ...
Definition predicate.h:41
Template Parameters
TThe type of the argument accepted by the invokable entity pointed to by the Predicate delegate type.

◆ SharedPtr

template<typename T0 >
using System::SharedPtr = System::SmartPtr<T0>

Alias for smart pointer widely used in the library.

Template Parameters
TPointee type.

◆ StreamPtr

An alias for a smart pointer that points to an instance of System::IO::Stream class.

◆ StreamReaderPtr

An alias for a smart pointer that points to an instance of System::IO::StreamReader class.

◆ StreamWriterPtr

An alias for a smart pointer that points to an instance of System::IO::StreamWriter class.

◆ StringComparerPtr

An alias for a shared pointer to an instance of StringComparer class.

◆ TimeZoneInfoPtr

Alias for shared pointer to an instance of TimeZoneInfo class.

◆ TimeZonePtr

Shared pointer to an instance of TimeZone class.

Enumeration Type Documentation

◆ Base64FormattingOptions

Enumeration containing values that represent different formats of base-64 encoded data.

Enumerator
None 

No formatting.

InsertLineBreaks 

Insert line breaks after every 76th character.

◆ DateTimeKind

enum class System::DateTimeKind
strong

Enumeration values of which represent the kinds of date and time.

Enumerator
Unspecified 

Unspecified kind.

Utc 

UTC time.

Local 

Local time.

◆ DayOfWeek

enum class System::DayOfWeek : int
strong

Enumeration that represents a day of week.

Enumerator
Sunday 
Monday 
Tuesday 
Wednesday 
Thursday 
Friday 
Saturday 

◆ EnvironmentVariableTarget

Specifies the environment variable location.

Enumerator
Process 

Environment block associated with the current process.

User 

Registry key HKEY_CURRENT_USER\Environment.

Machine 

Registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment.

◆ MidpointRounding

enum class System::MidpointRounding
strong

Specifies the behavior of rounding functions.

Enumerator
ToEven 

Round to the nearest even number.

AwayFromZero 

Round to the nearest number that is away from zero.

◆ PlatformID

enum class System::PlatformID
strong

Represents an operating system platform.

Enumerator
Win32S 

Win32S layer.

Win32Windows 

Windows 95 or Windows 98.

Win32NT 

Windows NT or later.

WinCE 

Windows CE.

Unix 

Unix.

Xbox 

Xbox.

MacOSX 

Macintosh.

◆ SmartPtrMode

enum class System::SmartPtrMode : char
strong

SmartPtr pointer type: weak or shared. Defines whether pointer is being counted when it is being decided whether to delete object or not.

Enumerator
Shared 

Shared mode: pointer participates in reference counting.

Weak 

Weak mode: pointer does not participate in reference counting.

◆ StringComparison

enum class System::StringComparison
strong

Defines string comparison style.

Enumerator
CurrentCulture 

Use current culture.

CurrentCultureIgnoreCase 

Use current culture, but ignore case.

InvariantCulture 

Use invariant culture.

InvariantCultureIgnoreCase 

Use invariant culture, but ignore case.

Ordinal 

Use ordinal sort rules.

OrdinalIgnoreCase 

Use ordinal sort rules, but ignore case.

◆ StringSplitOptions

enum class System::StringSplitOptions
strong

Determines string splitting behavior.

Enumerator
None 

Keep empty strings when splitting string.

RemoveEmptyEntries 

Discard empty strings when splitting string.

◆ TypeCode

enum class System::TypeCode
strong

Represents the type of an object.

Enumerator
Empty 

A null reference.

Object 

A general type representing any reference or value type not explicitly represented by another TypeCode.

DBNull 

A database null (column) value.

Boolean 

A simple type representing Boolean values of true or false.

Char 

An integral type representing unsigned 16-bit integers with values between 0 and 65535.

SByte 

An integral type representing signed 8-bit integers with values between -128 and 127.

Byte 

An integral type representing unsigned 8-bit integers with values between 0 and 255.

Int16 

An integral type representing signed 16-bit integers with values between -32768 and 32767.

UInt16 

An integral type representing unsigned 16-bit integers with values between 0 and 65535.

Int32 

An integral type representing signed 32-bit integers with values between -2147483648 and 2147483647.

UInt32 

An integral type representing unsigned 32-bit integers with values between 0 and 4294967295.

Int64 

An integral type representing signed 64-bit integers with values between -9223372036854775808 and 9223372036854775807.

UInt64 

An integral type representing unsigned 64-bit integers with values between 0 and 18446744073709551615.

Single 

A floating point type representing values ranging from approximately 1.5 x 10 -45 to 3.4 x 10 38 with a precision of 7 digits.

Double 

A floating point type representing values ranging from approximately 5.0 x 10 -324 to 1.7 x 10 308 with a precision of 15-16 digits.

Decimal 

A simple type representing values ranging from 1.0 x 10 -28 to approximately 7.9 x 10 28 with 28-29 significant digits.

DateTime 

A type representing a date and time value.

String 

A sealed class type representing Unicode character strings.

◆ UriComponents

enum class System::UriComponents
strong

Represents URI components.

Enumerator
Scheme 

The Scheme data.

UserInfo 

The UserInfo data.

Host 

The Host data.

Port 

The Port data.

SchemeAndServer 

The Scheme, Host and Port data.

Path 

The LocalPath data.

Query 

The Query data.

PathAndQuery 

The LocalPath and Query data.

HttpRequestUrl 

The Scheme, Host, Port, Query and LocalPath data.

Fragment 

The Fragment data.

AbsoluteUri 

The Scheme, Host, Port, Quer, LocalPath and Fragment data.

StrongPort 

The Port data; if the port data not present in the Uri and a default port has been assigned to the Scheme, the default port is returned; if there is no default port, -1 is returned.

HostAndPort 

The Host and Port data; if the port data is not present in the Uri and a default port has been assigned to the Scheme, the default port is returned. If there is no default port, -1 is returned.

StrongAuthority 

The UserInfo, Host, and Port data.If no port data is in the Uri and a default port has been assigned to the Scheme, the default port is returned.If there is no default port, -1 is returned.

NormalizedHost 
KeepDelimiter 

Specifies that the delimiter should be included.

SerializationInfoString 

The complete Uri context that is needed for Uri Serializers. The context includes the IPv6 scope.

◆ UriFormat

enum class System::UriFormat
strong

Specifies how the URI is escaped.

Enumerator
UriEscaped 

Escaping according to RFC-2396.

Unescaped 

No escaping.

SafeUnescaped 

Only the characters that have a reserved meaning in the URI are escaped.

◆ UriHostNameType

enum class System::UriHostNameType
strong

Represents the type of host name.

Enumerator
Unknown 

The host name type is not supplied.

Basic 

The name is set but its type cannot be determined.

Dns 

DNS name.

IPv4 

IPv4 address.

IPv6 

IPv6 address.

◆ UriKind

enum class System::UriKind
strong

Represents the kinds of URIs.

Enumerator
RelativeOrAbsolute 

Undetermined kind.

Absolute 

Absolute URI.

Relative 

Relative URI.

◆ UriPartial

enum class System::UriPartial
strong

Represents the parts of a URI for the Uri.GetLeftPart method.

Enumerator
Scheme 

The scheme component of the URI.

Authority 

The scheme and authority components of the URI.

Path 

The scheme, authority and path components of the URI.

Query 

The scheme, authority, path and query components of the URI.

Function Documentation

◆ AsCast() [1/12]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Static, Result > System::AsCast ( const Source & value)

Casts the source type to the result type using 'as' operator cast. Used when simple constructor-like cast is needed.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ AsCast() [2/12]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::None, Result > System::AsCast ( const Source & value)

Casts the source type to the result type using 'as' operator cast. Used when the source and the result types are the same.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ AsCast() [3/12]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Exception, Result > System::AsCast ( const Source & value)

Casts the source type to the result type using 'as' operator cast. Used for exception wrappers.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result. Returns nullptr if no conversion available.

◆ AsCast() [4/12]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::ObjectToException, Result > System::AsCast ( const Source & value)

Casts the source type to the result type using 'as' operator cast. Used for casting object to exception.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result. Returns nullptr if no conversion available.

◆ AsCast() [5/12]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Pointer, typename CastResult< Result >::type > System::AsCast ( const Source & value)

Casts the source type to the result type using 'as' operator cast. Used when the source and result both are smart pointers.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result. Returns nullptr if no conversion available.

◆ AsCast() [6/12]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::PointerToPointer, Result > System::AsCast ( const Source & value)

Casts the source type to the result type using 'as' operator cast. Used when the source and result both are smart pointers (with expicit SmartPtr<...> in result type).

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result. Returns nullptr if no conversion available.

◆ AsCast() [7/12]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::UnboxingToNullable, Result > System::AsCast ( const Source & value)

Casts the source type to the result type using 'as' operator cast. Used for unboxing object to nullable.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result. Returns empty nullable if no conversion available.

◆ AsCast() [8/12]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::NullableBoxing, Result > System::AsCast ( const Source & value)

Casts the source type to the result type using 'as' operator cast. Used for boxing nullable object.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ AsCast() [9/12]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Boxing, typename CastResult< Result >::type > System::AsCast ( const Source & value)

Casts the source type to the result type using 'as' operator cast. Used for boxing common object.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ AsCast() [10/12]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::UnboxingToString, Result > System::AsCast ( const Source & value)

Casts the source type to the result type using 'as' operator cast. Used for string unboxing.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ AsCast() [11/12]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Null, typename CastResult< Result >::type > System::AsCast ( const Source & value)

Casts the source type to the result type using 'as' operator cast. Used for nullptr casing.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ AsCast() [12/12]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Array, typename CastResult< Result >::type > System::AsCast ( const Source & value)

Casts the source type to the result type using 'as' operator cast. Used to cast between arrays.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result. Returns nullptr if no conversion for any array member is available.

◆ Cast()

template<typename TTo , typename TFrom >
std::enable_if<!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type System::Cast ( SmartPtr< TFrom > const & obj)

Performs cast on SmartPtr objects.

Template Parameters
TToTarget pointee type.
TFromSource pointee type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed.
Exceptions
InvalidCastExceptionif cast is not allowed.

◆ Cast_noexcept()

template<typename TTo , typename TFrom >
std::enable_if<!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type System::Cast_noexcept ( SmartPtr< TFrom > const & obj)

Performs cast on SmartPtr objects.

Template Parameters
TToTarget pointee type.
TFromSource pointee type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed or nullptr otherwise.

◆ CastEnumerableTo() [1/2]

template<class To , class From >
std::enable_if<!System::detail::has_method_get_Count< From >::value, Collections::Generic::ListPtr< To > >::type System::CastEnumerableTo ( const From & enumerable)

Performs the explicit casting of elements of the specified enumerable object to different type.

Parameters
enumerableEnumerable object containing the elements to cast
Returns
A pointer to a new collection containing elements of type To equivalent to the elements of enumerable
Template Parameters
ToThe type to statically cast the elements of the enumerable object to
FromThe type of enumerable object

◆ CastEnumerableTo() [2/2]

template<class To , class From >
std::enable_if< System::detail::has_method_get_Count< From >::value, Collections::Generic::ListPtr< To > >::type System::CastEnumerableTo ( const From & enumerable)

Performs the explicit casting of elements of the specified enumerable object to different type.

Parameters
enumerableis inheritor of Enumerable object with defined get_Count method and containing the elements to cast
Returns
A pointer to a new collection containing elements of type To equivalent to the elements of enumerable
Template Parameters
ToThe type to statically cast the elements of the enumerable object to
FromThe type of enumerable object

◆ CheckedCast()

template<typename TTo , typename TFrom >
TTo System::CheckedCast ( TFrom value)

Determines if the specified value falls into the range of values of type TTo and if it does casts it to the type TTo.

Parameters
valueThe value to cast
Returns
The value of type TTo equivalent to value
Exceptions
OverflowExceptionIf the specified value does not fall into the range of values represented by the TTo type
Template Parameters
TToThe type to which the specified value is to be cast
TFromThe type of the specified value

◆ Compare() [1/2]

template<typename TA , typename TB >
std::enable_if_t<!std::is_floating_point< TA >::value &&!std::is_floating_point< TB >::value, int > System::Compare ( const TA & a,
const TB & b )

Compares two values.

Parameters
aThe first comparand
bThe second comparand
Returns
-1 if a compares less than b; 0 if the values are equal; 1 if a compares greater than b
Template Parameters
TAThe type of the first comparand
TBThe type of the second comparand

◆ Compare() [2/2]

template<typename TA , typename TB >
std::enable_if_t< std::is_floating_point< TA >::value &&std::is_floating_point< TB >::value, int > System::Compare ( const TA & a,
const TB & b )

Compares two floating point values.

Parameters
aThe first comparand
bThe second comparand
Returns
-1 if a compares less than b; 0 if the values are equal; 1 if a compares greater than b
Template Parameters
TAThe type of the first comparand
TBThe type of the second comparand

◆ const_pointer_cast()

template<class Y , class X >
SmartPtr< Y > System::const_pointer_cast ( SmartPtr< X > const & x)

Casts smart pointers using const_cast.

Template Parameters
XSource pointer pointee type.
YTarget pointer pointee type.
Parameters
xSource pointer.
Returns
Pointer after cast.

◆ ConstCast()

template<typename TTo , typename TFrom >
CastResult< TTo >::type System::ConstCast ( const SmartPtr< TFrom > & obj)

End of deprecated casts.

Performs const cast on SmartPtr objects.

Template Parameters
TToTarget pointee type.
TFromSource pointee type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed or nullptr otherwise.

◆ Default() [1/2]

template<typename T >
std::enable_if< IsExceptionWrapper< T >::value, constT & >::type System::Default ( )

Returns the default-constructed instance of the specified type.

Template Parameters
TThe type whose instance is returned

◆ Default() [2/2]

template<typename T >
std::enable_if<!IsExceptionWrapper< T >::value, constT & >::type System::Default ( )

Returns the default-constructed instance of the specified type.

Template Parameters
TThe type whose instance is returned

◆ DoTryFinally() [1/3]

template<typename T , typename F >
std::enable_if_t< Details::is_lambda_void_void< T >::value > System::DoTryFinally ( T && tryBlock,
F && finallyBlock )

The sigle function that emulates behavior of C#'s try[-catch]-finally statement. During translation of C#'s try[-catch]-finally statement with translator's option finally_statement_as_lambda set to true, the statement is translated into the invocation of this method.

Parameters
tryBlockThe function object whose body contains the implementation of the try[-catch] part of the try[-catch]-finally statemet being emulated
finallyBlockThe function object whose body contains the implementation of the finally part of the try[-catch]-finally statement being emulated
Template Parameters
TThe type of the function object that implements the try[-catch] part of the try[-catch]-finally statement being emulated
FThe type of the function object that implements the finally part of the try[-catch]-finally statement being emulated

◆ DoTryFinally() [2/3]

template<typename T , typename F >
std::enable_if_t< Details::is_lambda_void_boolref< T >::value, bool > System::DoTryFinally ( T && tryBlock,
F && finallyBlock )

The sigle function that emulates behavior of C#'s try[-catch]-finally statement. During translation of C#'s try[-catch]-finally statement with translator's option finally_statement_as_lambda set to true, the statement is translated into the invocation of this method. This overload handles the case in which the return value of the function object that implements the try[-catch] part of the try[-catch]-finally statement is bool.

Parameters
tryBlockThe function object whose body contains the implementation of the try[-catch] part of the try[-catch]-finally statemet being emulated
finallyBlockThe function object whose body contains the implementation of the finally part of the try[-catch]-finally statement being emulated
Template Parameters
TThe type of the function object that implements the try[-catch] part of the try[-catch]-finally statement being emulated
FThe type of the function object that implements the finally part of the try[-catch]-finally statement being emulated

◆ DoTryFinally() [3/3]

template<typename T , typename F >
std::enable_if_t< Details::is_lambda_nonovoid_boolref< T >::value, std::optional< Details::ResultOf< T, bool & > > > System::DoTryFinally ( T && tryBlock,
F && finallyBlock )

The sigle function that emulates behavior of C#'s try[-catch]-finally statement. During translation of C#'s try[-catch]-finally statement with translator's option finally_statement_as_lambda set to true, the statement is translated into the invocation of this method. This overload handles the case in which the return value of the function object that implements the try[-catch] part of the try[-catch]-finally statement is bool&.

Parameters
tryBlockThe function object whose body contains the implementation of the try[-catch] part of the try[-catch]-finally statemet being emulated
finallyBlockThe function object whose body contains the implementation of the finally part of the try[-catch]-finally statement being emulated
Template Parameters
TThe type of the function object that implements the try[-catch] part of the try[-catch]-finally statement being emulated
FThe type of the function object that implements the finally part of the try[-catch]-finally statement being emulated

◆ dynamic_pointer_cast()

template<class Y , class X >
SmartPtr< Y > System::dynamic_pointer_cast ( SmartPtr< X > const & x)

Casts smart pointers using dynamic_cast.

Template Parameters
XSource pointer pointee type.
YTarget pointer pointee type.
Parameters
xSource pointer.
Returns
Pointer after cast.

◆ DynamicCast() [1/7]

template<typename TTo , typename TFrom >
std::enable_if< IsExceptionWrapper< TFrom >::value &&IsExceptionWrapper< TTo >::value &&(std::is_convertible< TTo, TFrom >::value||std::is_base_of< TTo, TFrom >::value), TTo >::type System::DynamicCast ( const TFrom & obj)

Performs dynamic cast on Exception objects.

Template Parameters
TToTarget Exception type.
TFromSource Exception type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed.
Exceptions
InvalidCastExceptionif cast is not allowed.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ DynamicCast() [2/7]

template<typename TTo , typename TFrom >
std::enable_if<!std::is_enum< TTo >::value &&!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type System::DynamicCast ( SmartPtr< TFrom > const & obj)

Performs dynamic cast on SmartPtr objects.

Template Parameters
TToTarget pointee type.
TFromSource pointee type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed.
Exceptions
InvalidCastExceptionif cast is not allowed.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ DynamicCast() [3/7]

template<typename TTo , typename TFrom >
std::enable_if< std::is_enum< TTo >::value, TTo >::type System::DynamicCast ( SmartPtr< TFrom > obj)

Unboxes boxed enum via cast.

Template Parameters
TToTarget enum type.
TFromSource pointee type.
Parameters
objPointer to the object to unbox data from.
Returns
Unboxed enum value.
Exceptions
InvalidCastExceptionif obj is not a boxed enum.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ DynamicCast() [4/7]

template<typename TTo , typename TFrom >
std::enable_if< std::is_same< System::Object, TFrom >::value &&IsExceptionWrapper< TTo >::value, TTo >::type System::DynamicCast ( SmartPtr< TFrom > obj)

Performs dynamic cast on Objects to Exception objects.

Template Parameters
TToTarget Exception type.
TFromObject type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed.
Exceptions
InvalidCastExceptionif cast is not allowed.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ DynamicCast() [5/7]

template<typename TTo >
CastResult< TTo >::type System::DynamicCast ( std::nullptr_t )
noexcept

Performs dynamic cast of null objects.

Template Parameters
TToTarget pointee type.
Returns
nullptr.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ DynamicCast() [6/7]

template<typename TTo , typename TFrom >
std::enable_if<!IsExceptionWrapper< TFrom >::value &&!IsSmartPtr< TFrom >::value &&std::is_convertible< TTo, TFrom >::value, TTo >::type System::DynamicCast ( TFrom & obj)

Performs dynamic cast on non-pointer objects.

Template Parameters
TToTarget type.
TFromSource type.
Parameters
objSource object.
Returns
Cast result.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ DynamicCast() [7/7]

template<typename TTo , typename TFrom >
std::enable_if< std::is_pointer< TTo >::value &&std::is_same< IntPtr, TFrom >::value, TTo >::type System::DynamicCast ( TFrom value)
noexcept

Performs dynamic cast from IntPtr to pointer.

Template Parameters
TToTarget type.
TFromSource type.
Parameters
valueSource IntPtr value.
Returns
Cast result.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ DynamicCast_noexcept() [1/3]

template<typename TTo , typename TFrom >
std::enable_if< IsExceptionWrapper< TFrom >::value &&IsExceptionWrapper< TTo >::value &&(std::is_convertible< TTo, TFrom >::value||std::is_base_of< TTo, TFrom >::value), TTo >::type System::DynamicCast_noexcept ( const TFrom & obj)
noexcept

Old obsolete casts. Will be removed in future versions.

Performs dynamic cast on Exception objects.

Template Parameters
TToTarget Exception type.
TFromSource Exception type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed or nullptr otherwise.
Deprecated
Left for backwards compatibility. Use AsCast instead.

◆ DynamicCast_noexcept() [2/3]

template<typename TTo , typename TFrom >
std::enable_if<!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type System::DynamicCast_noexcept ( SmartPtr< TFrom > const & obj)
noexcept

Performs dynamic cast on SmartPtr objects.

Template Parameters
TToTarget pointee type.
TFromSource pointee type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed or nullptr otherwise.
Deprecated
Left for backwards compatibility. Use AsCast instead.

◆ DynamicCast_noexcept() [3/3]

template<typename TTo , typename TFrom >
std::enable_if< std::is_same< System::Object, TFrom >::value &&IsExceptionWrapper< TTo >::value, TTo >::type System::DynamicCast_noexcept ( SmartPtr< TFrom > obj)
noexcept

Performs dynamic cast on Objects to Exception objects.

Template Parameters
TToTarget Exception type.
TFromObject type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed or nullptr otherwise.
Deprecated
Left for backwards compatibility. Use AsCast instead.

◆ DynamicCastArray()

template<class To , class From >
SharedPtr< Array< To > > System::DynamicCastArray ( const SharedPtr< Array< From > > & from)

Performs casting of elements of the specified array to different type.

Parameters
fromShared pointer to the array containing the elements to cast
Returns
A pointer to a new array containing elements of type To equivalent to the elements of from
Template Parameters
ToThe type to cast the elements of the specified array to
FromThe type of elements of the elements of the arry elements of which to cast
Deprecated
Added for backward compatibility. Use ExplicitCast instead.

◆ Equals()

template<typename TA , typename TB >
bool System::Equals ( const TA & a,
const TB & b )
inline

Determines the equality of two values applying operator==() to them.

Parameters
aThe first comparand
bThe second comparand
Returns
The boolean value returned by operator==() applied to a and b
Template Parameters
TAThe type of the first comparand
TBThe type of the second comparand

◆ Equals< double, double >()

template<>
bool System::Equals< double, double > ( const double & a,
const double & b )
inline

Specialization for double-precision floating point values.

Parameters
aThe first comparand
bThe second comparand
Returns
True if both values are NaN or are equal, otherwise - false

◆ Equals< float, float >()

template<>
bool System::Equals< float, float > ( const float & a,
const float & b )
inline

Specialization for single-precision floating point values. Although two floating point NaNs are defined by IEC 60559:1989 to always compare as unequal, the contract for System.Object.Equals, requires that overrides must satisfy the requirements for an equivalence operator. Therefore, System.Double.Equals and System.Single.Equals return True when comparing two NaNs, while the equality operator returns False in that case, as required by the standard.

Parameters
aThe first comparand
bThe second comparand
Returns
True if both values are NaN or are equal, otherwise - false

◆ ExplicitCast() [1/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::None, Result > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used when the source and the result types are the same.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ ExplicitCast() [2/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Static, Result > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used when simple constructor-like cast is needed.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ ExplicitCast() [3/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Exception, Result > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used for exception wrappers.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.
Exceptions
System::InvalidCastExceptionIf no cast available.

◆ ExplicitCast() [4/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::ObjectToException, Result > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used for casting object to exception.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.
Exceptions
System::InvalidCastExceptionIf no cast available.

◆ ExplicitCast() [5/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Pointer, typename CastResult< Result >::type > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used when the source and result both are smart pointers (without expicit SmartPtr<...> in result type).

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.
Exceptions
System::InvalidCastExceptionIf no cast available.

◆ ExplicitCast() [6/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::PointerToPointer, Result > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used when the source and result both are smart pointers (with expicit SmartPtr<...> in result type).

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.
Exceptions
System::InvalidCastExceptionIf no cast available.

◆ ExplicitCast() [7/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::UnboxingToNullable, Result > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used for unboxing object to nullable.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.
Exceptions
System::InvalidCastExceptionIf no cast available.

◆ ExplicitCast() [8/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::NullableBoxing, Result > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used to box nullable.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ ExplicitCast() [9/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::NullableUnboxing, Result > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used for unboxing nullable object.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.
Exceptions
System::NullReferenceExceptionIf value is empty.

◆ ExplicitCast() [10/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::EnumBoxing, SmartPtr< BoxedValueBase > > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used for enum boxing.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ ExplicitCast() [11/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Boxing, typename CastResult< Result >::type > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used for common boxing.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ ExplicitCast() [12/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::StringBoxing, typename CastResult< Result >::type > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used for System::String boxing.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ ExplicitCast() [13/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Unboxing, Result > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used for common unboxing.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ ExplicitCast() [14/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Null, typename CastResult< Result >::type > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used for nullptr casting.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.

◆ ExplicitCast() [15/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::Array, typename CastResult< Result >::type > System::ExplicitCast ( const Source & value)

Casts the source type to the result type using explicit cast. Used for casting between arrays.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.
Exceptions
System::InvalidCastExceptionIf no cast available.

◆ ExplicitCast() [16/16]

template<typename Result , typename Source >
std::enable_if_t< Details::CastType< Source, Result >::RawPointer, typename CastResult< std::remove_pointer_t< Result > >::type > System::ExplicitCast ( Source value)

Casts the source type to the result type using explicit cast. Used when the casting raw pointer to smart pointer.

Template Parameters
SourceThe source type.
ResultThe result type.
Parameters
valueObject to cast.
Returns
The cast result.
Exceptions
System::InvalidCastExceptionIf no cast available.

◆ ForceStaticCast()

template<typename TTo , typename TFrom >
CastResult< TTo >::type System::ForceStaticCast ( SmartPtr< TFrom > const & obj)

Performs real static cast on SmartPtr objects.

Template Parameters
TToTarget pointee type.
TFromSource pointee type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed, otherwise the behavior is undefined.

◆ ForEachMemberGVName()

std::string System::ForEachMemberGVName ( )
inline

◆ get_pointer()

template<class T >
T * System::get_pointer ( System::SmartPtr< T > const & x)

Gets referenced object of smart pointer.

Template Parameters
TPointee type.
Parameters
xSource smart pointer.
Returns
Raw pointer to object referenced by smart pointer passed.

◆ GetHashCode() [1/5]

template<>
int System::GetHashCode ( const std::thread::id & id)
inline

Specialization for std::thread::id; Returns the hash code for the specified thread object.

◆ GetHashCode() [2/5]

template<typename T >
std::enable_if< std::is_scalar< T >::value, int >::type System::GetHashCode ( const T & obj)

Returns a hash code for the specified scalar value.

Parameters
objThe value to generate hash code for
Returns
The hash code generated for the specified value
Template Parameters
TThe type of the value for which the function generates hash code

◆ GetHashCode() [3/5]

template<typename T >
std::enable_if<!std::is_scalar< T >::value &&System::IsSmartPtr< T >::value, int >::type System::GetHashCode ( const T & obj)

Returns a hash code for the specified object.

Parameters
objThe SmartPtr pointing to the object to generate hash code for
Returns
The hash code generated for the specified object
Template Parameters
TThe type of the object for which the function generates hash code

◆ GetHashCode() [4/5]

template<typename T >
std::enable_if< System::IsExceptionWrapper< T >::value, int >::type System::GetHashCode ( const T & obj)

Returns a hash code for the specified object which is exception.

Parameters
objThe Exception Wrapper that contains the object to generate hash code for
Returns
The hash code generated for the specified object
Template Parameters
TThe type of the object for which the function generates hash code

◆ GetHashCode() [5/5]

template<typename T >
std::enable_if<!std::is_scalar< T >::value &&!System::IsSmartPtr< T >::value &&!System::IsExceptionWrapper< T >::value, int >::type System::GetHashCode ( const T & obj)

Returns a hash code for the specified object which is not a smart pointer nor exception.

Parameters
objA const reference to the object to generate hash code for
Returns
The hash code generated for the specified object
Template Parameters
TThe type of the object for which the function generates hash code

◆ is_vp_test()

bool System::is_vp_test ( const ::testing::TestInfo * test_info)
inline

◆ IsInfinity()

template<typename T >
bool System::IsInfinity ( const T & value)
inline

Determines if the specified value represents infinity.

Parameters
valueThe value to check
Returns
True if value represents infinity, otherwise - false
Template Parameters
TThe type of the value checked by the function

◆ IsNaN()

template<typename T >
bool System::IsNaN ( const T & value)
inline

Determines if the specified value is Not-A-Number value.

Parameters
valueThe value to check
Returns
True if value is a NaN value, otherwise - false
Template Parameters
TThe type of the value checked by the function

◆ IsNegativeInfinity()

template<typename T >
bool System::IsNegativeInfinity ( const T & value)
inline

Determines if the specified value represents negative infinity.

Parameters
valueThe value to check
Returns
True if value represents negative infinity, otherwise - false
Template Parameters
TThe type of the value checked by the function

◆ IsPositiveInfinity()

template<typename T >
bool System::IsPositiveInfinity ( const T & value)
inline

Determines if the specified value represents positive infinity.

Parameters
valueThe value to check
Returns
True if value represents positive infinity, otherwise - false
Template Parameters
TThe type of the value checked by the function

◆ IterateOver() [1/7]

template<typename Enumerable >
std::enable_if_t<!IsSmartPtr< Enumerable >::value, Details::EnumeratorAdapter< Enumerable, Details::ValueTypeOfEnumerable< Enumerable >, Enumerable * > > System::IterateOver ( const Enumerable * enumerable)

This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable this with default target type.

Template Parameters
EnumerableThe type of a wrapped object

◆ IterateOver() [2/7]

template<typename T , typename Enumerable >
std::enable_if_t<!IsSmartPtr< Enumerable >::value, Details::EnumeratorAdapter< Enumerable, T, Enumerable * > > System::IterateOver ( const Enumerable * enumerable)

This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable without begin(), end() methods with target type argument for (auto& value : IterateOver<SomeType>(enumerable))

Template Parameters
TThe target type, it has to be returned from iterator
EnumerableThe type of a wrapped object

◆ IterateOver() [3/7]

template<typename T , typename Enumerable >
std::enable_if_t<!Details::IsIterable< Enumerable >::value, Details::EnumeratorAdapter< Enumerable, T > > System::IterateOver ( System::SmartPtr< Enumerable > enumerable)

This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable without begin(), end() methods with target type argument for (auto& value : IterateOver<SomeType>(enumerable))

Template Parameters
TThe target type, it has to be returned from iterator
EnumerableThe type of a wrapped object

◆ IterateOver() [4/7]

template<typename Enumerable >
std::enable_if_t<!Details::IsIterable< Enumerable >::value, Details::EnumeratorAdapter< Enumerable > > System::IterateOver ( System::SmartPtr< Enumerable > enumerable)

This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable without begin(), end() methods with default target type argument for (auto& value : IterateOver(enumerable)) analog to the following C# code foreach (var value in enumerable)

Template Parameters
EnumerableThe type of a wrapped object

◆ IterateOver() [5/7]

template<typename Enumerable >
std::enable_if_t< Details::IsIterable< Enumerable >::value, System::SmartPtr< Enumerable > > System::IterateOver ( System::SmartPtr< Enumerable > enumerable)

This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable with begin(), end() methods with default target type argument for (auto& value : IterateOver(enumerable))

Template Parameters
EnumerableThe type of a wrapped object

◆ IterateOver() [6/7]

template<typename T , typename Enumerable >
std::enable_if_t< Details::IsIterable< Enumerable >::value &&std::is_same< typename Details::ReturnTypeTrait< T >::ReturnType, Details::IterableValueType< Enumerable > >::value, System::SmartPtr< Enumerable > > System::IterateOver ( System::SmartPtr< Enumerable > enumerable)

This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable with begin(), end() methods with target type same as original value_type of iterator.

Template Parameters
EnumerableThe type of a wrapped object
TThe target type which has to returned from iterator

◆ IterateOver() [7/7]

template<typename T , typename Enumerable >
std::enable_if_t< Details::IsIterable< Enumerable >::value &&!std::is_same< typename Details::ReturnTypeTrait< T >::ReturnType, Details::IterableValueType< Enumerable > >::value, Details::CppIteratorAdapter< Enumerable, T > > System::IterateOver ( System::SmartPtr< Enumerable > enumerable)

This function property wraps enumerable (or iterable) object so it can be used with range-based for loop This overload for Enumerable with begin(), end() methods with different target type and original value_type of iterator.

Template Parameters
EnumerableThe type of a wrapped object
TThe target type which has to returned from iterator

◆ MakeArray() [1/3]

template<class T , class... Args>
ArrayPtr< T > System::MakeArray ( Args &&... args)

A factory function that constructs a new Array object passing the specified arguments to its constructor.

Parameters
argsThe arguments that are passed to the constructor of the Array object being constructed
Returns
A smart pointer pointing to the constructed Array object
Template Parameters
TThe type of elements of the Array object the function constructs

◆ MakeArray() [2/3]

template<class T , class Integral , class... Args>
std::enable_if< std::is_integral< Integral >::value, ArrayPtr< T > >::type System::MakeArray ( Integral size,
Args &&... args )

A factory function that constructs a new Array object passing the specified arguments to its constructor.

Parameters
sizeSize of the array being created.
argsThe arguments that are passed to the constructor of the Array object being constructed
Returns
A smart pointer pointing to the constructed Array object
Template Parameters
TThe type of elements of the Array object the function constructs
IntegralType of array size.

◆ MakeArray() [3/3]

template<typename T >
ArrayPtr< T > System::MakeArray ( std::initializer_list< T > init)

A factory function that constructs a new Array object, fills it with the elements from the specified initialization list and returns a smart pointer pointing to the Array object.

Parameters
initThe initialization list containing the elements to fill the array with
Returns
A smart pointer pointing to the constructed Array object
Template Parameters
TThe type of elements of the Array object the function constructs
#include "system/array.h"
#include <iostream>
int main()
{
// Fill the array.
auto arr = System::MakeArray<int>({-1, -123, 5, 3, 7});
// Print elements of the array.
for(auto item: arr)
{
std::cout << item << ' ';
}
std::cout << std::endl;
return 0;
}
/*
This code example produces the following output:
-1 -123 5 3 7
*/

◆ MakeObject() [1/2]

template<class T , class ... Args>
std::enable_if<!IsSmartPtr< T >::value, SmartPtr< T > >::type System::MakeObject ( Args &&... args)

Creates object on heap and returns shared pointer to it.

Template Parameters
TClass to instantiate.
ArgsConstructor arguments' types.
Parameters
argsConstructor arguments.
Returns
SmartPtr to newly created object, always in shared mode.

◆ MakeObject() [2/2]

template<class T , class ... Args>
std::enable_if< IsSmartPtr< T >::value, T >::type System::MakeObject ( Args &&... args)

Creates object on heap and returns shared pointer to it.

Template Parameters
TSmartPtr to class to instantiate.
ArgsConstructor arguments' types.
Parameters
argsConstructor arguments.
Returns
SmartPtr to newly created object, always in shared mode.

◆ MakeScopeGuard()

template<typename F >
ScopeGuard< F > System::MakeScopeGuard ( F f)

A factory function that creates instances of ScopedGuard class.

Parameters
fThe function object to pass to ScopedGuard class' constructor.
Returns
A new instance of ScopedGuard class
Template Parameters
Thetype of the function object to be invoked by the constructed ScopedGuard object

◆ MakeSharedPtr() [1/2]

template<class X >
SmartPtr< X > System::MakeSharedPtr ( const X * p)

Converts raw pointer to smart pointer. Overload for const pointers. Useful e. g. when using 'this' variable in C# methods translated as const.

Template Parameters
XPointee type.
Parameters
pRaw pointer to object.
Returns
Shared smart pointer to object.

◆ MakeSharedPtr() [2/2]

template<class X >
SmartPtr< X > System::MakeSharedPtr ( X * p)

Converts raw pointer to smart pointer.

Template Parameters
XPointee type.
Parameters
pRaw pointer to object.
Returns
Shared smart pointer to object.

◆ MemberwiseClone()

template<typename T >
SmartPtr< Object > System::MemberwiseClone ( T * ptr)

Performs memberwise cloning using copy constructor.

Template Parameters
TClass to be copy-constructed. Subclass information is being lost.
Parameters
ptrPointer to the object to clone.
Returns
Pointer to cloned object.

◆ ObjectType::GetType< System::DateTime >()

Implements typeof() translation. Overload for DateTime.

◆ ObjectType::GetType< System::String >()

Implements typeof() translation. Overload for String.

◆ operator!=() [1/16]

template<typename T >
bool System::operator!= ( ArraySegment< T > a,
ArraySegment< T > b )

◆ operator!=() [2/16]

template<class Chars , typename std::enable_if< IsStringLiteral< Chars, char_t >::value >::type * = nullptr>
bool System::operator!= ( Chars & left,
const String & right )
inline

String comparison.

Template Parameters
CharsString literal type.
Parameters
leftString literal to compare.
rightString to compare.
Returns
false if strings match, true otherwise.

◆ operator!=() [3/16]

ASPOSECPP_SHARED_API bool System::operator!= ( const SharedPtr< Object > & left,
const String & right )

Object and string comparison.

Parameters
leftObject to convert to string and compare.
rightString to compare.
Returns
false if object string representation equals to string, true otherwise.

◆ operator!=() [4/16]

ASPOSECPP_SHARED_API bool System::operator!= ( const SharedPtr< Uri > & uri1,
const SharedPtr< Uri > & uri2 )

Determines if the URIs represented by the current and specified objects are not equal.

Parameters
uri1The first Uri object to compare
uri2The second Uri object to compare
Returns
True if URIs not equal, otherwise - false

◆ operator!=() [5/16]

template<class X , class Y >
bool System::operator!= ( const SmartPtr< X > & x,
const SmartPtr< Y > & y )

Non-equal-compares two smart pointers.

Template Parameters
XPointee type of first pointer.
YPointee type of second pointer.
Parameters
xFirst pointer to compare.
ySecond pointer to compare.
Returns
False if pointers match, true otherwise.

◆ operator!=() [6/16]

template<class X , class Y >
std::enable_if< std::is_base_of< Object, Y >::value &&detail::has_no_operator_equal< X, Y >::value, bool >::type System::operator!= ( const SmartPtr< X > & x,
const Y * y )

Inequality comparison smart pointer against simple (C) pointer.

Template Parameters
Xtype of smart pointer.
Ytype of simple pointer.
Parameters
xsmart pointer to compare (left).
ypointer to compare (right).
Returns
False if pointers match, true otherwise.

◆ operator!=() [7/16]

template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value, bool >::type System::operator!= ( const T1 & some,
const Nullable< T2 > & other )

Determines if the specified value is not equal to the value represented by the specified Nullable object by applying operator!=() to these values.

Parameters
someA constant reference to the value that is to be used as the first comparand
otherA constant reference to the Nullable object the represented value of which is to be used as the second comparand
Returns
True if the comparands are not equal, otherwise - false
Template Parameters
T1The type of the first comparand value
T2The underlying type of the Nullable object that represents the second comparand value

◆ operator!=() [8/16]

template<class X , class Y >
std::enable_if< std::is_base_of< Object, X >::value &&detail::has_no_operator_equal< X, Y >::value, bool >::type System::operator!= ( const X * x,
const SmartPtr< Y > & y )

Equality comparison smart pointer against simple (C) pointer.

Template Parameters
Xtype of simple pointer.
Ytype of smart pointer.
Parameters
xpointer to compare (right).
ysmart pointer to compare (left).
Returns
False if pointers match, true otherwise.

◆ operator!=() [9/16]

template<class X >
bool System::operator!= ( SmartPtr< X > const & x,
std::nullptr_t  )

Checks if smart pointer is not null.

Template Parameters
XPointee type of pointer.
Parameters
xPointer to check.
Returns
False if pointer is null, true otherwise.

◆ operator!=() [10/16]

bool System::operator!= ( std::nullptr_t ,
const DateTimeOffset &  )
constexpr

◆ operator!=() [11/16]

template<typename T >
bool System::operator!= ( std::nullptr_t ,
const Nullable< T > & other )

Determines if the specified Nullable object represents a value that is not equal to null.

Parameters
otherA constant reference to an Nullable object to test
Returns
True if the specified object represents non-null value, false otherwise

◆ operator!=() [12/16]

ASPOSECPP_SHARED_API bool System::operator!= ( std::nullptr_t ,
const String & str )

Checks if string is null.

Parameters
strString to check.
Returns
false if string is null, true otherwise.

◆ operator!=() [13/16]

bool System::operator!= ( std::nullptr_t ,
DateTime  )
constexpr

◆ operator!=() [14/16]

template<class X >
bool System::operator!= ( std::nullptr_t ,
SmartPtr< X > const & x )

Checks if smart pointer is not null.

Template Parameters
XPointee type of pointer.
Parameters
xPointer to check.
Returns
False if pointer is null, true otherwise.

◆ operator!=() [15/16]

bool System::operator!= ( std::nullptr_t ,
TimeSpan  )
constexpr

◆ operator!=() [16/16]

template<class T , typename std::enable_if< IsStringPointer< T, char_t >::value >::type * = nullptr>
bool System::operator!= ( T & left,
const String & right )
inline

String comparison.

Template Parameters
TString pointer type.
Parameters
leftString pointer to compare.
rightString to compare.
Returns
false if strings match, true otherwise.

◆ operator*()

template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Decimal System::operator* ( const T & x,
const Decimal & d )

Returns a new instance of Decimal class that represents a value that is a result of multiplication of the specified value and the value represented by the specified Decimal object.

Parameters
xThe first multiplier
dThe Decimal object representing the second multiplier
Returns
A new instance of Decimal class that represents a value that is a result of multiplication of x and the value represented by d.

◆ operator+() [1/6]

String System::operator+ ( const char_t left,
const String & right )
inline

String concatenation.

Parameters
leftCharacter to concatenate to string.
rightString to concatenate.
Returns
Concatenated string.

◆ operator+() [2/6]

template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Decimal System::operator+ ( const T & x,
const Decimal & d )

Returns a new instance of Decimal class that represents a value that is a sum of the specified value and the value represented by the specified Decimal object.

Parameters
xThe first summand
dThe constant reference to the Decimal object representing the second summand
Returns
A new instance of Decimal class that represents a value that is a sum of x and the value represented by the d.

◆ operator+() [3/6]

template<typename T1 , typename T2 , typename = typename std::enable_if<!IsNullable<T1>::value && !IsNullable<T2>::value && !std::is_same<T1, System::String>::value, int>::type>
auto System::operator+ ( const T1 & some,
const Nullable< T2 > & other ) -> System::Nullable<decltype(some + other.get_Value())>

Sums non-nullable and nullable values.

Template Parameters
T1Left operand type.
T2Right operand type.
Parameters
someLeft operand.
otherRight operand.
Returns
Summing result.

◆ operator+() [4/6]

template<typename T >
MulticastDelegate< T > System::operator+ ( MulticastDelegate< T > lhv,
MulticastDelegate< T > rhv )

Connects all callbacks from right hand delegate to the end of left hand delegate callback list.

Parameters
lhvThe delegate to which callbacks are added.
rhvThe delegate whose callbacks are being added.
Returns
Returns a delegate that contains the callbacks of the left hand value and then the right hand ones.

◆ operator+() [5/6]

template<typename T >
std::enable_if< IsStringLiteral< T, char_t >::value, String >::type System::operator+ ( T & left,
const String & right )
inline

String concatenation.

Template Parameters
TString literal type.
Parameters
leftLiteral to concatenate to string.
rightString to concatenate.
Returns
Concatenated string.

◆ operator+() [6/6]

template<typename T >
std::enable_if< IsStringPointer< T, char_t >::value, String >::type System::operator+ ( T & left,
const String & right )
inline

String concatenation.

Template Parameters
TString pointer type.
Parameters
leftString pointer to concatenate to string.
rightString to concatenate.
Returns
Concatenated string.

◆ operator-() [1/4]

template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Decimal System::operator- ( const T & x,
const Decimal & d )

Returns a new instance of Decimal class that represents a value that is the result of subtraction of the value represented by the specified Decimal object from the specified value.

Parameters
xThe value to subtract from
dThe Decimal object representing the subtracted value
Returns
A new instance of Decimal class that represents a value that is the result of subtraction of the value represented by d from x.

◆ operator-() [2/4]

template<typename T1 , typename T2 , typename = typename std::enable_if<!IsNullable<T1>::value && !IsNullable<T2>::value && !std::is_same<T1, System::String>::value, int>::type>
auto System::operator- ( const T1 & some,
const Nullable< T2 > & other ) -> System::Nullable<decltype(some - other.get_Value())>

Subtracts non-nullable and nullable values.

Template Parameters
T1Left operand type.
T2Right operand type.
Parameters
someLeft operand.
otherRight operand.
Returns
Substation result.

◆ operator-() [3/4]

auto System::operator- ( DayOfWeek a,
DayOfWeek b )
inline

Calculates the number of days between two days of week.

Parameters
aThe minuend
bThe subtrahend
Returns
The number of days between weekdays a and b; the return value is a negative number if goes after

◆ operator-() [4/4]

template<typename T >
MulticastDelegate< T > System::operator- ( MulticastDelegate< T > lhv,
MulticastDelegate< T > rhv )

Disconnects all callbacks in right hand delegate from the end of left hand delegate callback list.

Parameters
lhvThe delegate from which callbacks will be removed.
rhvThe delegate whose callbacks will be removed.
Returns
Returns a delegate that contains the callbacks of the left hand value, but without the right hand value ones.

◆ operator/()

template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Decimal System::operator/ ( const T & x,
const Decimal & d )

Returns a new instance of Decimal class that represents a value that is a result of division of the specified value and the value represented by the specified Decimal object.

Parameters
xThe value to divide
dThe Decimal object representing the divisor
Returns
A new instance of Decimal class that represents a value that is a result of division of x by the value represented by d.

◆ operator<() [1/5]

template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value, bool >::type System::operator< ( const T1 & some,
const Nullable< T2 > & other )

Determines if the specified value is less than the value represented by the specified Nullable object by applying operator<() to these values.

Parameters
someA constant reference to the value that is to be used as the first comparand
otherA constant reference to the Nullable object the represented value of which is to be used as the second comparand
Returns
True if the first comparand is less than the second comparand, otherwise - false
Template Parameters
T1The type of the first comparand value
T2The underlying type of the Nullable object that represents the second comparand value

◆ operator<() [2/5]

bool System::operator< ( std::nullptr_t ,
const DateTimeOffset &  )
constexpr

◆ operator<() [3/5]

template<typename T >
bool System::operator< ( std::nullptr_t ,
const Nullable< T > &  )

Always returns false.

◆ operator<() [4/5]

bool System::operator< ( std::nullptr_t ,
DateTime  )
constexpr

◆ operator<() [5/5]

bool System::operator< ( std::nullptr_t ,
TimeSpan  )
constexpr

◆ operator<<() [1/28]

ASPOSECPP_SHARED_API std::ostream & System::operator<< ( std::ostream & os,
const String & str )

Outputs a string to the output stream using UTF-8 encoding.

Parameters
osAn output stream object (instantiation of basic_ostream with char).
strA string to be sent to the output stream.
Returns
An output stream to which the string was added.

◆ operator<<() [2/28]

ASPOSECPP_SHARED_API std::ostream & System::operator<< ( std::ostream & stream,
const Decimal & decimal )

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
decimalData to insert.
Returns
stream.

◆ operator<<() [3/28]

std::ostream & System::operator<< ( std::ostream & stream,
const Exception & exception )
inline

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
exceptionData to insert.
Returns
stream.

◆ operator<<() [4/28]

std::ostream & System::operator<< ( std::ostream & stream,
const Guid & guid )
inline

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
guidData to insert.
Returns
stream.

◆ operator<<() [5/28]

template<typename T >
std::ostream & System::operator<< ( std::ostream & stream,
const Nullable< T > & value )

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
valueData to insert.
Returns
stream.

◆ operator<<() [6/28]

std::ostream & System::operator<< ( std::ostream & stream,
const OperatingSystem & os )
inline

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
osData to insert.
Returns
stream.

◆ operator<<() [7/28]

template<typename T >
std::ostream & System::operator<< ( std::ostream & stream,
const SharedPtr< T > & object_ptr )

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
object_ptrData to insert.
Returns
stream.

◆ operator<<() [8/28]

ASPOSECPP_SHARED_API std::ostream & System::operator<< ( std::ostream & stream,
const System::Object & object )

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
objectData to insert.
Returns
stream.

◆ operator<<() [9/28]

ASPOSECPP_SHARED_API std::ostream & System::operator<< ( std::ostream & stream,
const TypeInfo & type_info )

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
type_infoData to insert.
Returns
stream.

◆ operator<<() [10/28]

std::ostream & System::operator<< ( std::ostream & stream,
const Version & version )
inline

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
versionData to insert.
Returns
stream.

◆ operator<<() [11/28]

template<typename T >
std::ostream & System::operator<< ( std::ostream & stream,
const WeakPtr< T > & object_ptr )

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
object_ptrData to insert.
Returns
stream.

◆ operator<<() [12/28]

std::ostream & System::operator<< ( std::ostream & stream,
DateTime date_time )
inline

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
date_timeData to insert.
Returns
stream.

◆ operator<<() [13/28]

std::ostream & System::operator<< ( std::ostream & stream,
DateTimeOffset value )
inline

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
valueData to insert.
Returns
stream.

◆ operator<<() [14/28]

std::ostream & System::operator<< ( std::ostream & stream,
TimeSpan time_span )
inline

Insert data into the stream using UTF-8 encoding.

Parameters
streamOutput stream to insert data to.
time_spanData to insert.
Returns
stream.

◆ operator<<() [15/28]

ASPOSECPP_SHARED_API std::wostream & System::operator<< ( std::wostream & os,
const String & str )

Outputs a string to the output stream.

Parameters
osAn output stream object (instantiation of basic_ostream with wchar_t).
strA string to be sent to the output stream.
Returns
An output stream to which the string was added.

◆ operator<<() [16/28]

ASPOSECPP_SHARED_API std::wostream & System::operator<< ( std::wostream & stream,
const Decimal & decimal )

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
decimalData to insert.
Returns
stream.

◆ operator<<() [17/28]

std::wostream & System::operator<< ( std::wostream & stream,
const Exception & exception )
inline

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
exceptionData to insert.
Returns
stream.

◆ operator<<() [18/28]

std::wostream & System::operator<< ( std::wostream & stream,
const Guid & guid )
inline

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
guidData to insert.
Returns
stream.

◆ operator<<() [19/28]

template<typename T >
std::wostream & System::operator<< ( std::wostream & stream,
const Nullable< T > & value )

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
valueData to insert.
Returns
stream.

◆ operator<<() [20/28]

std::wostream & System::operator<< ( std::wostream & stream,
const OperatingSystem & os )
inline

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
osData to insert.
Returns
stream.

◆ operator<<() [21/28]

template<typename T >
std::wostream & System::operator<< ( std::wostream & stream,
const SharedPtr< T > & object_ptr )

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
object_ptrData to insert.
Returns
stream.

◆ operator<<() [22/28]

ASPOSECPP_SHARED_API std::wostream & System::operator<< ( std::wostream & stream,
const System::Object & object )

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
objectData to insert.
Returns
stream.

◆ operator<<() [23/28]

ASPOSECPP_SHARED_API std::wostream & System::operator<< ( std::wostream & stream,
const TypeInfo & type_info )

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
type_infoData to insert.
Returns
stream.

◆ operator<<() [24/28]

std::wostream & System::operator<< ( std::wostream & stream,
const Version & version )
inline

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
versionData to insert.
Returns
stream.

◆ operator<<() [25/28]

template<typename T >
std::wostream & System::operator<< ( std::wostream & stream,
const WeakPtr< T > & object_ptr )

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
object_ptrData to insert.
Returns
stream.

◆ operator<<() [26/28]

std::wostream & System::operator<< ( std::wostream & stream,
DateTime date_time )
inline

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
date_timeData to insert.
Returns
stream.

◆ operator<<() [27/28]

std::wostream & System::operator<< ( std::wostream & stream,
DateTimeOffset value )
inline

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
valueData to insert.
Returns
stream.

◆ operator<<() [28/28]

std::wostream & System::operator<< ( std::wostream & stream,
TimeSpan time_span )
inline

Insert data into the stream.

Parameters
streamOutput stream to insert data to.
time_spanData to insert.
Returns
stream.

◆ operator<=() [1/5]

template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value, bool >::type System::operator<= ( const T1 & some,
const Nullable< T2 > & other )

Determines if the specified value is less or equal to the value represented by the specified Nullable object by applying operator<=() to these values.

Parameters
someA constant reference to the value that is to be used as the first comparand
otherA constant reference to the Nullable object the represented value of which is to be used as the second comparand
Returns
True if the first comparand is less or equal to the second comparand, otherwise - false
Template Parameters
T1The type of the first comparand value
T2The underlying type of the Nullable object that represents the second comparand value

◆ operator<=() [2/5]

bool System::operator<= ( std::nullptr_t ,
const DateTimeOffset &  )
constexpr

◆ operator<=() [3/5]

template<typename T >
bool System::operator<= ( std::nullptr_t ,
const Nullable< T > &  )

Always returns false.

◆ operator<=() [4/5]

bool System::operator<= ( std::nullptr_t ,
DateTime  )
constexpr

◆ operator<=() [5/5]

bool System::operator<= ( std::nullptr_t ,
TimeSpan  )
constexpr

◆ operator==() [1/17]

template<typename T >
bool System::operator== ( ArraySegment< T > a,
ArraySegment< T > b )

◆ operator==() [2/17]

template<class Chars , typename std::enable_if< IsStringLiteral< Chars, char_t >::value >::type * = nullptr>
bool System::operator== ( Chars & left,
const String & right )
inline

String comparison.

Template Parameters
CharsString literal type.
Parameters
leftString literal to compare.
rightString to compare.
Returns
true if strings match, false otherwise.

◆ operator==() [3/17]

ASPOSECPP_SHARED_API bool System::operator== ( const SharedPtr< Object > & left,
const String & right )

Object and string comparison.

Parameters
leftObject to convert to string and compare.
rightString to compare.
Returns
true if object string representation equals to string, false otherwise.

◆ operator==() [4/17]

ASPOSECPP_SHARED_API bool System::operator== ( const SharedPtr< Uri > & uri1,
const SharedPtr< Uri > & uri2 )

Determines if the URIs represented by the current and specified objects are equal.

Parameters
uri1The first Uri object to compare
uri2The second Uri object to compare
Returns
True if URIs are equal, otherwise - false

◆ operator==() [5/17]

template<class X , class Y >
bool System::operator== ( const SmartPtr< X > & x,
const SmartPtr< Y > & y )

Equal-compares two smart pointers.

Template Parameters
XPointee type of first pointer.
YPointee type of second pointer.
Parameters
xFirst pointer to compare.
ySecond pointer to compare.
Returns
True if pointers match, false otherwise.

◆ operator==() [6/17]

template<class X , class Y >
std::enable_if< std::is_base_of< Object, Y >::value &&detail::has_no_operator_equal< X, Y >::value, bool >::type System::operator== ( const SmartPtr< X > & x,
const Y * y )

Equality comparison smart pointer against simple (C) pointer.

Template Parameters
Xtype of smart pointer.
Ytype of simple pointer.
Parameters
xsmart pointer to compare (left).
ypointer to compare (right).
Returns
True if pointers match, false otherwise.

◆ operator==() [7/17]

template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value, bool >::type System::operator== ( const T1 & some,
const Nullable< T2 > & other )

Determines if the specified value is equal to the value represented by the specified Nullable object by applying operator==() to these values.

Parameters
someA constant reference to the value that is to be used as the first comparand
otherA constant reference to the Nullable object the represented value of which is to be used as the second comparand
Returns
True if the comparands are equal, otherwise - false
Template Parameters
T1The type of the first comparand value
T2The underlying type of the Nullable object that represents the second comparand value

◆ operator==() [8/17]

template<class X , class Y >
std::enable_if< std::is_base_of< Object, X >::value &&detail::has_no_operator_equal< X, Y >::value, bool >::type System::operator== ( const X * x,
const SmartPtr< Y > & y )

Equality comparison smart pointer against simple (C) pointer.

Template Parameters
Xtype of simple pointer.
Ytype of smart pointer.
Parameters
xpointer to compare (right).
ysmart pointer to compare (left).
Returns
True if pointers match, false otherwise.

◆ operator==() [9/17]

bool System::operator== ( std::nullptr_t ,
const DateTimeOffset &  )
constexpr

◆ operator==() [10/17]

template<typename T >
bool System::operator== ( std::nullptr_t ,
const Nullable< T > & other )

Determines if the specified Nullable object represents a value that is equal to null.

Parameters
otherA constant reference to an Nullable object to test
Returns
True if the specified object represents null value, false otherwise

◆ operator==() [11/17]

ASPOSECPP_SHARED_API bool System::operator== ( std::nullptr_t ,
const String & str )

Checks if string is null.

Parameters
strString to check.
Returns
true if string is null, false otherwise.

◆ operator==() [12/17]

bool System::operator== ( std::nullptr_t ,
DateTime  )
constexpr

◆ operator==() [13/17]

template<class X >
bool System::operator== ( std::nullptr_t ,
SmartPtr< X > const & x )

Checks if smart pointer is null.

Template Parameters
XPointee type of pointer.
Parameters
xPointer to check.
Returns
True if pointer is null, false otherwise.

◆ operator==() [14/17]

template<class T >
std::enable_if<!std::is_scalar< T >::value &&!std::is_pointer< T >::value &&!std::is_array< T >::value &&detail::has_method_is_null< T >::value, bool >::type System::operator== ( std::nullptr_t ,
T const & x )

Checks if value type object (translated C# structure, etc.) is null.

Template Parameters
TValue type.
Parameters
xObject to check.
Returns
True if object is null, false otherwise.

◆ operator==() [15/17]

bool System::operator== ( std::nullptr_t ,
TimeSpan  )
constexpr

◆ operator==() [16/17]

template<class T , typename std::enable_if< IsStringPointer< T, char_t >::value >::type * = nullptr>
bool System::operator== ( T & left,
const String & right )
inline

String comparison.

Template Parameters
TString pointer type.
Parameters
leftString pointer to compare.
rightString to compare.
Returns
true if strings match, false otherwise.

◆ operator==() [17/17]

template<class T >
std::enable_if<!std::is_scalar< T >::value &&!std::is_pointer< T >::value &&!std::is_array< T >::value &&detail::has_method_is_null< T >::value, bool >::type System::operator== ( T const & x,
std::nullptr_t  )

Checks if value type object (translated C# structure, etc.) is null.

Template Parameters
TValue type.
Parameters
xObject to check.
Returns
True if object is null, false otherwise.

◆ operator>() [1/5]

template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value, bool >::type System::operator> ( const T1 & some,
const Nullable< T2 > & other )

Determines if the specified value is greater than the value represented by the specified Nullable object by applying operator>() to these values.

Parameters
someA constant reference to the value that is to be used as the first comparand
otherA constant reference to the Nullable object the represented value of which is to be used as the second comparand
Returns
True if the first comparand is greater than the second comparand, otherwise - false
Template Parameters
T1The type of the first comparand value
T2The underlying type of the Nullable object that represents the second comparand value

◆ operator>() [2/5]

bool System::operator> ( std::nullptr_t ,
const DateTimeOffset &  )
constexpr

◆ operator>() [3/5]

template<typename T >
bool System::operator> ( std::nullptr_t ,
const Nullable< T > &  )

Always returns false.

◆ operator>() [4/5]

bool System::operator> ( std::nullptr_t ,
DateTime  )
constexpr

◆ operator>() [5/5]

bool System::operator> ( std::nullptr_t ,
TimeSpan  )
constexpr

◆ operator>=() [1/5]

template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value, bool >::type System::operator>= ( const T1 & some,
const Nullable< T2 > & other )

Determines if the specified value is greater or equal to the value represented by the specified Nullable object by applying operator>=() to these values.

Parameters
someA constant reference to the value that is to be used as the first comparand
otherA constant reference to the Nullable object the represented value of which is to be used as the second comparand
Returns
True if the first comparand is greater or equal than the second comparand, otherwise - false
Template Parameters
T1The type of the first comparand value
T2The underlying type of the Nullable object that represents the second comparand value

◆ operator>=() [2/5]

bool System::operator>= ( std::nullptr_t ,
const DateTimeOffset &  )
constexpr

◆ operator>=() [3/5]

template<typename T >
bool System::operator>= ( std::nullptr_t ,
const Nullable< T > &  )

Always returns false.

◆ operator>=() [4/5]

bool System::operator>= ( std::nullptr_t ,
DateTime  )
constexpr

◆ operator>=() [5/5]

bool System::operator>= ( std::nullptr_t ,
TimeSpan  )
constexpr

◆ operator>>() [1/2]

ASPOSECPP_SHARED_API std::istream & System::operator>> ( std::istream & in,
String & str )

Gets a string from the input streamusing UTF-8 encoding.

Parameters
inAn input stream object (instantiation of basic_ostream with char).
strA string to read from the input stream.
Returns
An input stream from which the string was extracted.

◆ operator>>() [2/2]

ASPOSECPP_SHARED_API std::wistream & System::operator>> ( std::wistream & in,
String & str )

Gets a string from the input stream.

Parameters
inAn input stream object (instantiation of basic_ostream with wchar_t).
strA string to read from the input stream.
Returns
An input stream from which the string was extracted.

◆ PrintTo() [1/13]

ASPOSECPP_SHARED_API void System::PrintTo ( const Decimal & d,
::std::ostream * os )

Writes the value represented by the specified object to the specified output stream.

Parameters
dThe Decimal object to print to the stream
osThe stream to print the specified object to

◆ PrintTo() [2/13]

ASPOSECPP_SHARED_API void System::PrintTo ( const Details_Exception & exception,
std::ostream * stream )

Prints value to ostream. Mostly used for debug.

◆ PrintTo() [3/13]

template<typename T >
void System::PrintTo ( const ExceptionWrapper< T > & exception_wrapper,
std::ostream * stream )

Prints value to ostream. Mostly used for debug.

◆ PrintTo() [4/13]

ASPOSECPP_SHARED_API void System::PrintTo ( const Guid & value,
std::ostream * stream )

Prints value to ostream. Mostly used for debug.

◆ PrintTo() [5/13]

template<typename T >
void System::PrintTo ( const Nullable< T > & value,
std::ostream * stream )

Prints value to ostream. Mostly used for debug.

◆ PrintTo() [6/13]

template<typename T >
std::enable_if_t< detail::has_print_to_function< T >::value, void > System::PrintTo ( const SmartPtr< T > & object_ptr,
std::ostream * stream )

Prints value to ostream. Mostly used for debug.

◆ PrintTo() [7/13]

template<typename T >
std::enable_if_t<!detail::has_print_to_function< T >::value, void > System::PrintTo ( const SmartPtr< T > & object_ptr,
std::ostream * stream )

Prints value to ostream. Mostly used for debug.

◆ PrintTo() [8/13]

ASPOSECPP_SHARED_API void System::PrintTo ( const System::Object & value,
std::ostream * stream )

Prints value to ostream. Mostly used for debug.

◆ PrintTo() [9/13]

ASPOSECPP_SHARED_API void System::PrintTo ( const System::String & value,
std::ostream * os )

Prints string to ostream. Mostly used for debug.

Parameters
valueto print.
ostarget ostream.

◆ PrintTo() [10/13]

template<typename T >
void System::PrintTo ( const WeakPtr< T > & object_ptr,
std::ostream * stream )

Prints value to ostream. Mostly used for debug.

◆ PrintTo() [11/13]

ASPOSECPP_SHARED_API void System::PrintTo ( DateTime value,
std::ostream * stream )

Prints value to ostream. Mostly used for debug.

◆ PrintTo() [12/13]

ASPOSECPP_SHARED_API void System::PrintTo ( DateTimeOffset value,
std::ostream * stream )

Prints value to ostream. Mostly used for debug.

◆ PrintTo() [13/13]

ASPOSECPP_SHARED_API void System::PrintTo ( TimeSpan value,
std::ostream * stream )

Prints value to ostream. Mostly used for debug.

◆ Ref() [1/3]

template<typename T >
decltype(Ref(std::declval< T & >())) System::Ref ( const std::reference_wrapper< T > & wrapper)

Wrapper to make sure Ref(std::ref(DynamicWeakPtr)) works.

Template Parameters
TReferenced type.
Parameters
wrapperstd wrapper to unwrap.
Returns
Reference type defined in System:: rather than in std.

◆ Ref() [2/3]

template<typename T , SmartPtrMode trunkMode, unsigned int ... weakLeafs>
DynamicWeakPtr< T, trunkMode, weakLeafs... >::Reference System::Ref ( DynamicWeakPtr< T, trunkMode, weakLeafs... > & ptr)

Creates reference to DynamicWeakPtr object. Used by translator when passing function arguments by reference.

Template Parameters
TPointee type.
trunkModeMode of smart pointer itself.
weakLeafsIndexes of template arguments for which SetTemplateWeakPtr method must be called.
Parameters
ptrSmart pointer to create reference to.
Returns
Smart pointer reference.

◆ Ref() [3/3]

template<typename T >
T & System::Ref ( T & value)

Helper function to acquire references to objects. Used to guarantee that System::DynamicWeakPtr updates referenced object after assignments.

Template Parameters
TType to create reference to.
Parameters
valueValue to create reference to.
Returns
Reference to the value passed to this function.

◆ setter_decrement_wrap() [1/3]

template<typename T , typename Host , typename HostConstGet , typename HostSet >
std::enable_if< std::is_base_of< HostConstGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type System::setter_decrement_wrap ( Host *const host,
T(HostConstGet::* pGetter )() const,
void(HostSet::* pSetter )(T) )
inline

Translator translates C#'s pre-decrement expressions targeting instance's property that has setter and getter defined, into invocation of this function (overload for const getter).

Template Parameters
TThe type of the property.
Host- class of instance to be modified
HostConstGet- Host itself, or it's base type, where property's getter is defined
HostSet- Host itself, or it's base type, where property's setter is defined
Parameters
hostInstance to call getters and setters for.
pGetterFunction pointer pointing to the property's getter function
pSetterFunction pointer pointing to the property's setter function
Returns
The value of the property before incrementing

◆ setter_decrement_wrap() [2/3]

template<typename T , typename Host , typename HostGet , typename HostSet >
std::enable_if< std::is_base_of< HostGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type System::setter_decrement_wrap ( Host *const host,
T(HostGet::* pGetter )(),
void(HostSet::* pSetter )(T) )
inline

Translator translates C#'s pre-decrement expressions targeting instance's property that has setter and getter defined, into invocation of this function (overload for non-const getter).

Template Parameters
TThe type of the property.
Host- class of instance to be modified
HostGet- Host itself, or it's base type, where property's getter is defined
HostSet- Host itself, or it's base type, where property's setter is defined
Parameters
hostInstance to call getters and setters for.
pGetterFunction pointer pointing to the property's getter function
pSetterFunction pointer pointing to the property's setter function
Returns
The value of the property before incrementing

◆ setter_decrement_wrap() [3/3]

template<typename T >
T System::setter_decrement_wrap ( T(* pGetter )(),
void(* pSetter )(T) )
inline

Translator translates C#'s pre-decrement expressions targeting class' property that has setter and getter defined, into invocation of this function.

Parameters
pGetterFunction pointer pointing to the property's getter free function
pSetterFunction pointer pointing to the property's setter free function
Returns
The value of the property before incrementing
Template Parameters
TThe type of the property

◆ setter_increment_wrap() [1/2]

template<typename T , typename Host , typename HostGet , typename HostSet >
std::enable_if< std::is_base_of< HostGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type System::setter_increment_wrap ( Host *const host,
T(HostGet::* pGetter )(),
void(HostSet::* pSetter )(T) )
inline

Translator translates C#'s increment expressions targeting class' property that has setter and getter defined, into invocation of this function.

Parameters
hostA pointer to an object whose property is to be incremented
pGetterFunction pointer pointing to the property's getter method
pSetterFunction pointer pointing to the property's setter method
Returns
The incremented value of the property
Template Parameters
TThe type of the property
Host- class of instance to be modified
HostGet- Host itself, or it's base type, where property's getter is defined
HostSet- Host itself, or it's base type, where property's setter is defined

◆ setter_increment_wrap() [2/2]

template<typename T >
T System::setter_increment_wrap ( T(* pGetter )(),
void(* pSetter )(T) )
inline

Translator translates C#'s increment expressions targeting class' property that has setter and getter defined, into invocation of this function.

Parameters
pGetterFunction pointer pointing to the property's getter free function
pSetterFunction pointer pointing to the property's setter free function
Returns
The incremented value of the property
Template Parameters
TThe type of the property

◆ setter_post_decrement_wrap() [1/3]

template<typename T , typename Host , typename HostConstGet , typename HostSet >
std::enable_if< std::is_base_of< HostConstGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type System::setter_post_decrement_wrap ( Host *const host,
T(HostConstGet::* pGetter )() const,
void(HostSet::* pSetter )(T) )
inline

Translator translates C#'s post-decrement expressions targeting instance's property that has setter and getter defined, into invocation of this function (overload for const getter).

Template Parameters
TThe type of the property.
Host- class of instance to be modified
HostConstGet- Host itself, or it's base type, where property's getter is defined
HostSet- Host itself, or it's base type, where property's setter is defined
Parameters
hostInstance to call getters and setters for.
pGetterFunction pointer pointing to the property's getter function
pSetterFunction pointer pointing to the property's setter function
Returns
The value of the property before incrementing

◆ setter_post_decrement_wrap() [2/3]

template<typename T , typename Host , typename HostGet , typename HostSet >
std::enable_if< std::is_base_of< HostGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type System::setter_post_decrement_wrap ( Host *const host,
T(HostGet::* pGetter )(),
void(HostSet::* pSetter )(T) )
inline

Translator translates C#'s post-decrement expressions targeting instance's property that has setter and getter defined, into invocation of this function (overload for non-const getter).

Template Parameters
TThe type of the property.
Host- class of instance to be modified
HostGet- Host itself, or it's base type, where property's getter is defined
HostSet- Host itself, or it's base type, where property's setter is defined
Parameters
hostInstance to call getters and setters for.
pGetterFunction pointer pointing to the property's getter function
pSetterFunction pointer pointing to the property's setter function
Returns
The value of the property before incrementing

◆ setter_post_decrement_wrap() [3/3]

template<typename T >
T System::setter_post_decrement_wrap ( T(* pGetter )(),
void(* pSetter )(T) )
inline

Translator translates C#'s post-decrement expressions targeting class' property that has setter and getter defined, into invocation of this function.

Parameters
pGetterFunction pointer pointing to the property's getter free function
pSetterFunction pointer pointing to the property's setter free function
Returns
The value of the property before incrementing
Template Parameters
TThe type of the property

◆ setter_post_increment_wrap() [1/3]

template<typename T , typename Host , typename HostConstGet , typename HostSet >
std::enable_if< std::is_base_of< HostConstGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type System::setter_post_increment_wrap ( Host *const host,
T(HostConstGet::* pGetter )() const,
void(HostSet::* pSetter )(T) )
inline

Translator translates C#'s post-increment expressions targeting instance's property that has setter and getter defined, into invocation of this function (overload for const getter).

Template Parameters
TThe type of the property.
Host- class of instance to be modified
HostConstGet- Host itself, or it's base type, where property's getter is defined
HostSet- Host itself, or it's base type, where property's setter is defined
Parameters
hostInstance to call getters and setters for.
pGetterFunction pointer pointing to the property's getter function
pSetterFunction pointer pointing to the property's setter function
Returns
The value of the property before incrementing

◆ setter_post_increment_wrap() [2/3]

template<typename T , typename Host , typename HostGet , typename HostSet >
std::enable_if< std::is_base_of< HostGet, Host >::value &&std::is_base_of< HostSet, Host >::value, T >::type System::setter_post_increment_wrap ( Host *const host,
T(HostGet::* pGetter )(),
void(HostSet::* pSetter )(T) )
inline

Translator translates C#'s post-increment expressions targeting instance's property that has setter and getter defined, into invocation of this function (overload for non-const getter).

Template Parameters
TThe type of the property.
Host- class of instance to be modified
HostGet- Host itself, or it's base type, where property's getter is defined
HostSet- Host itself, or it's base type, where property's setter is defined
Parameters
hostInstance to call getters and setters for.
pGetterFunction pointer pointing to the property's getter function
pSetterFunction pointer pointing to the property's setter function
Returns
The value of the property before incrementing

◆ setter_post_increment_wrap() [3/3]

template<typename T >
T System::setter_post_increment_wrap ( T(* pGetter )(),
void(* pSetter )(T) )
inline

Translator translates C#'s post-increment expressions targeting class' property that has setter and getter defined, into invocation of this function.

Parameters
pGetterFunction pointer pointing to the property's getter free function
pSetterFunction pointer pointing to the property's setter free function
Returns
The value of the property before incrementing
Template Parameters
TThe type of the property

◆ setter_wrap() [1/2]

template<typename T , typename T2 , typename Host , typename HostSet >
std::enable_if< std::is_base_of< HostSet, Host >::value, T >::type System::setter_wrap ( Host *const host,
void(HostSet::* pSetter )(T2),
T value )
inline

Overload for instance setter functions with type conversion.

Template Parameters
TValue type.
T2Type expected by setter function.
HostInstance type.
HostSet- Host itself, or it's base type, where property's setter is defined.
Parameters
hostObject to call setter function for.
pSetterSetter function reference.
valueValue to set.
Returns
set value.

◆ setter_wrap() [2/2]

template<typename T , typename T2 >
T System::setter_wrap ( void(* pSetter )(T2),
T value )
inline

Overload for static setter functions with type conversion.

Template Parameters
TValue type.
T2Type expected by setter function.
Parameters
pSetterStatic setter function reference.
valueValue to set.
Returns
set value.

◆ static_pointer_cast()

template<class Y , class X >
SmartPtr< Y > System::static_pointer_cast ( SmartPtr< X > const & x)

Casts smart pointers using static_cast.

Template Parameters
XSource pointer pointee type.
YTarget pointer pointee type.
Parameters
xSource pointer.
Returns
Pointer after cast.

◆ StaticCast() [1/9]

template<typename TTo , typename TFrom >
std::enable_if<!std::is_same< TFrom, System::String >::value &&!IsExceptionWrapper< TFrom >::value &&!IsSmartPtr< TFrom >::value &&!std::is_arithmetic< TFrom >::value, TTo >::type System::StaticCast ( const TFrom & obj)

Performs static cast on non-pointer objects.

Template Parameters
TToTarget type.
TFromSource type.
Parameters
objSource object.
Returns
Cast result if cast is allowed.
Exceptions
InvalidCastExceptionif cast is not allowed.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ StaticCast() [2/9]

template<typename TTo , typename TFrom >
std::enable_if< IsExceptionWrapper< TFrom >::value &&IsExceptionWrapper< TTo >::value &&(std::is_convertible< TTo, TFrom >::value||std::is_base_of< TTo, TFrom >::value), TTo >::type System::StaticCast ( const TFrom & obj)

Performs static cast on Exception objects.

Template Parameters
TToTarget Exception type.
TFromSource Exception type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed.
Exceptions
InvalidCastExceptionif cast is not allowed.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ StaticCast() [3/9]

template<typename TTo , typename TFrom >
std::enable_if< std::is_arithmetic< TFrom >::value, TTo >::type System::StaticCast ( const TFrom * value)

Specialization for arithmetic types.

◆ StaticCast() [4/9]

template<typename TTo , typename TFrom >
std::enable_if<!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type System::StaticCast ( SmartPtr< TFrom > const & obj)

Performs static cast on SmartPtr objects.

Template Parameters
TToTarget pointee type.
TFromSource pointee type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed.
Exceptions
InvalidCastExceptionif cast is not allowed.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ StaticCast() [5/9]

template<typename TTo , typename TFrom >
std::enable_if< std::is_same< System::Object, TFrom >::value &&IsExceptionWrapper< TTo >::value, TTo >::type System::StaticCast ( SmartPtr< TFrom > obj)
noexcept

Performs static cast on Objects to Exception objects.

Template Parameters
TToTarget Exception type.
TFromObject type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed.
Exceptions
InvalidCastExceptionif cast is not allowed.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ StaticCast() [6/9]

template<typename TTo >
CastResult< TTo >::type System::StaticCast ( std::nullptr_t )

Performs static cast of null objects.

Template Parameters
TToTarget pointee type.
Returns
nullptr.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ StaticCast() [7/9]

template<typename TTo , typename TFrom >
std::enable_if< std::is_arithmetic< TFrom >::value, TTo >::type System::StaticCast ( TFrom value)

Specialization for arithmetic types.

◆ StaticCast() [8/9]

template<typename TTo >
std::enable_if< std::is_same< TTo, System::String >::value, TTo >::type System::StaticCast ( TTo value)

Process cast from String to String.

◆ StaticCast() [9/9]

template<typename TTo , typename TFrom >
CastResult< TTo >::type System::StaticCast ( WeakPtr< TFrom > const & obj)

Performs static cast on WeakPtr objects.

Template Parameters
TToTarget pointee type.
TFromSource pointee type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed.
Exceptions
InvalidCastExceptionif cast is not allowed.
Deprecated
Left for backwards compatibility. Use ExplicitCast instead.

◆ StaticCast_noexcept() [1/4]

template<typename TTo , typename TFrom >
std::enable_if< IsExceptionWrapper< TFrom >::value &&IsExceptionWrapper< TTo >::value &&(std::is_convertible< TTo, TFrom >::value||std::is_base_of< TTo, TFrom >::value), TTo >::type System::StaticCast_noexcept ( const TFrom & obj)

Performs static cast on Exception objects.

Template Parameters
TToTarget Exception type.
TFromSource Exception type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed or nullptr otherwise.
Deprecated
Left for backwards compatibility. Use AsCast instead.

◆ StaticCast_noexcept() [2/4]

template<typename TTo , typename TFrom >
std::enable_if<!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type System::StaticCast_noexcept ( SmartPtr< TFrom > const & obj)

Performs static cast on SmartPtr objects.

Template Parameters
TToTarget pointee type.
TFromSource pointee type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed or nullptr otherwise.
Deprecated
Left for backwards compatibility. Use AsCast instead.

◆ StaticCast_noexcept() [3/4]

template<typename TTo , typename TFrom >
std::enable_if< std::is_same< System::Object, TFrom >::value &&IsExceptionWrapper< TTo >::value, TTo >::type System::StaticCast_noexcept ( SmartPtr< TFrom > obj)
noexcept

Performs static cast on Objects to Exception objects.

Template Parameters
TToTarget Exception type.
TFromObject type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed or nullptr otherwise.
Deprecated
Left for backwards compatibility. Use AsCast instead.

◆ StaticCast_noexcept() [4/4]

template<typename TTo , typename TFrom >
CastResult< TTo >::type System::StaticCast_noexcept ( WeakPtr< TFrom > const & obj)

Performs static cast on WeakPtr objects.

Template Parameters
TToTarget pointee type.
TFromSource pointee type.
Parameters
objSource pointer.
Returns
Cast result if cast is allowed or nullptr otherwise.
Deprecated
Left for backwards compatibility. Use AsCast instead.

◆ StaticCastArray() [1/2]

template<typename To , typename From >
std::enable_if_t< System::IsSmartPtr< From >::value, System::SharedPtr< System::Array< To > > > System::StaticCastArray ( const System::SharedPtr< System::Array< From > > & from)

Performs casting of elements of the specified array to different type. Override for cases then From is SmartPtr obj.

Parameters
fromShared pointer to the array containing the elements to cast
Returns
A pointer to a new array containing elements of type To equivalent to the elements of from
Template Parameters
ToThe type to cast the elements of the specified array to
FromThe type of elements of the elements of the arry elements of which to cast
Deprecated
Added for backward compatibility. Use ExplicitCast instead.

◆ StaticCastArray() [2/2]

template<typename To , typename From >
std::enable_if_t<!System::IsSmartPtr< From >::value &&System::IsBoxable< From >::value &&std::is_same< To, System::SharedPtr< Object > >::value, System::SharedPtr< System::Array< To > > > System::StaticCastArray ( const System::SharedPtr< System::Array< From > > & from)

Performs casting of elements of the specified array to different type. Override for cases then From is Boxable and To is Object[].

Parameters
fromShared pointer to the array containing the elements to cast
Returns
A pointer to a new array containing elements of type To equivalent to the elements of from
Template Parameters
ToThe type to cast the elements of the specified array to
FromThe type of elements of the elements of the arry elements of which to cast
Deprecated
Added for backward compatibility. Use ExplicitCast instead.

Variable Documentation

◆ Array

template<typename T >
class ASPOSECPP_SHARED_CLASS System::Array

◆ WeakReference

template<typename... Args>
class ASPOSECPP_SHARED_CLASS System::WeakReference

Represents a weak reference, which references an object while still allowing that object to be deleted.

Template Parameters
ArgsTemplate arguments of a weak reference declaring a type of a referenced object, a number of arguments can be zero or one.