System Namespace Reference

Namespaces

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

Classes

class  Array
 
class  ArraySegment
 
class  AsposeCppLibrary
 
class  Attribute
 
struct  BasePointerType
 
struct  BasePointerType< WeakPtr< T > >
 
class  BaseTypesInfo
 
class  BaseTypesInfo< FirstType, BaseTypes... >
 
class  BaseTypesInfo<>
 Specialization of an instance of a type that has no parent types. More...
 
class  BitConverter
 
struct  Boolean
 Structure that keeps static members of System.Boolean .Net type. More...
 
class  BoxedEnum
 
class  BoxedValue
 
class  BoxedValue< System::Collections::Generic::KeyValuePair< TKey, TValue > >
 
class  BoxedValue< System::Drawing::Color >
 Represents a boxed value of System::Drawing::Color type. More...
 
class  BoxedValue< System::Drawing::Point >
 Represents a boxed value of System::Drawing::Point type. More...
 
class  BoxedValue< System::Drawing::PointF >
 Represents a boxed value of System::Drawing::PointF type. More...
 
class  BoxedValue< System::Drawing::Rectangle >
 Represents a boxed value of System::Drawing::Rectangle type. More...
 
class  BoxedValue< System::Drawing::RectangleF >
 Represents a boxed value of System::Drawing::RectangleF type. More...
 
class  BoxedValue< System::Drawing::Size >
 Represents a boxed value of System::Drawing::Size type. More...
 
class  BoxedValue< System::Drawing::SizeF >
 Represents a boxed value of System::Drawing::SizeF type. More...
 
class  BoxedValueBase
 
class  Buffer
 
struct  Byte
 
struct  CastResult
 Forward declatation of CastResult used by System::StaticCast, System::DynamicCast and alike functions. More...
 
struct  CastResult< Array< TTo > >
 Makes sure that conversion (StaticCast, DynamicCast, etc.) to array pointer return ArrayPtr, not naked SmartPtr. More...
 
struct  CastResult< MulticastDelegate< T > >
 
struct  CastResult< String >
 Specialization of CastResult for case of casting to string. More...
 
class  Char
 
struct  CollectionAssertHelper
 Heler API for collection-related operations. More...
 
class  Comparison
 
class  Console
 
class  ConsoleOutput
 
struct  Convert
 
class  DateTime
 
class  DateTimeOffset
 
class  DBNull
 
class  Decimal
 
class  DefaultBoxedValue
 
class  Delegate
 
class  Delegate< ReturnType(ArgumentTypes...)>
 
class  Details_Exception
 
struct  Double
 
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  EmptyArrayInitializer
 
struct  Enum
 
struct  EnumGetNameHelper
 
struct  EnumGetNameHelper< E, G, typename EnumMetaInfo< E >::Flags >
 Specialization for Guard = EnumMetaInfo<E>::Flags.
 
struct  EnumParseHelper
 
struct  EnumParseHelper< E, G, typename EnumMetaInfo< E >::Flags >
 Specialization for Guard = EnumMetaInfo<E>::Flags.
 
class  EnumValues
 
class  EnumValuesBase
 A base class for a class that represents meta information of enumeration type. More...
 
struct  Environment
 
class  EventArgs
 
class  EventHandler
 
class  ExceptionWrapper
 Template that represents wrapper of exceptions that are derived from Exception class. More...
 
class  ExceptionWrapper< Details_Exception >
 Template class specialization for Exception class.
 
class  ExceptionWrapperBase
 
class  ExceptionWrapperHelper
 
struct  ExceptionWrapperType
 
class  Func
 
class  GC
 
class  Guid
 
class  IAsyncResult
 
class  ICloneable
 
class  IComparable
 
class  IConvertible
 
class  ICustomFormatter
 
class  IDisposable
 
class  IEnumerableAdapter
 
class  IEnumerableDefaultAdapter
 
class  IEnumerableTupleAdapter
 
class  IEnumeratorIterator
 
class  IEquatable
 
class  IFormatProvider
 
class  IFormattable
 Defines a method that formats the value of the current object using the specified format string and format provider. More...
 
struct  Int16
 
struct  Int32
 
struct  Int64
 
struct  IsBoxable
 
struct  IsBoxable< Collections::Generic::KeyValuePair< TKey, TValue > >
 
struct  IsBoxable< DateTime >
 IsBoxable<T> specialization for DateTime. More...
 
struct  IsBoxable< DateTimeOffset >
 IsBoxable<T> specialization for DateTimeOffset. More...
 
struct  IsBoxable< Decimal >
 IsBoxable<T> specialization for Decimal. More...
 
struct  IsBoxable< Drawing::Color >
 A template predicate that determines if System::Drawing::Color class is boxable. More...
 
struct  IsBoxable< Drawing::Point >
 A template predicate that determines if Drawing::Point class is boxable. More...
 
struct  IsBoxable< Drawing::PointF >
 A template predicate that determines if Drawing::PointF class is boxable. More...
 
struct  IsBoxable< Drawing::Rectangle >
 A template predicate that determines if System::Drawing::Rectangle class is boxable. More...
 
struct  IsBoxable< Drawing::RectangleF >
 A template predicate that determines if System::Drawing::RectangleF class is boxable. More...
 
struct  IsBoxable< Drawing::Size >
 A template predicate that determines if Drawing::Size class is boxable. More...
 
struct  IsBoxable< Drawing::SizeF >
 A template predicate that determines if Drawing::SizeF class is boxable. More...
 
struct  IsBoxable< Guid >
 IsBoxable<T> specialization for Guid. More...
 
struct  IsBoxable< Nullable< T > >
 IsBoxable<T> specialization for Nullable. More...
 
struct  IsBoxable< String >
 IsBoxable<T> specialization for String. More...
 
struct  IsBoxable< System::Security::Cryptography::HashAlgorithmName >
 IsBoxable<T> specialization for HashAlgorithmName. More...
 
struct  IsBoxable< TimeSpan >
 IsBoxable<T> specialization for TimeSpan. More...
 
struct  IsBoxable< ValueType >
 IsBoxable<T> specialization for ValueType. More...
 
struct  IsBoxedValue
 
struct  IsBoxedValue< BoxedValue< T > >
 
struct  IsExceptionWrapper
 
struct  IsForwardingOf
 
struct  IsForwardingOf< T, U >
 
struct  IsNonConstStringArray
 
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
 
struct  IsStringLiteral
 
struct  IsStringPointer
 
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...
 
class  MarshalByRefObject
 
struct  Math
 
struct  MethodArgumentTuple
 
struct  MethodArgumentTuple< R(*)(Args...)>
 
struct  MethodArgumentTuple< R(C::*)(Args...) const >
 
struct  MethodArgumentTuple< R(C::*)(Args...)>
 
class  MulticastDelegate
 
class  MulticastDelegate< ReturnType(ArgumentTypes...)>
 
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 ported environment should inherit it. More...
 
class  ObjectExt
 
class  OperatingSystem
 
class  Random
 
struct  SByte
 
class  ScopedCulture
 
struct  ScopeGuard
 
struct  Single
 
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 ported) 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 ported). 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...
 
struct  static_holder
 
class  String
 
class  StringComparer
 
class  StringHashCompiletime
 
class  StringHashCompiletime< 0 >
 Specialization for the empty 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
 
class  TimeZone
 
class  TimeZoneInfo
 
class  TypeInfo
 Represents a particular type and provides information about it. More...
 
struct  TypeInfoPtr
 
struct  UInt16
 
struct  UInt32
 
struct  UInt64
 
class  Uri
 
class  UriBuilder
 
class  UriParser
 
class  UriShim
 Service class. More...
 
class  ValueType
 
class  Version
 
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...
 
class  WeakReference
 Represents a weak reference, which references an object while still allowing that object to be deleted. More...
 

Typedefs

template<class... Args>
using Action = MulticastDelegate< void(Args...)>
 
typedef System::ArrayPtr< uint8_t > ByteArrayPtr
 An alias for a smart pointer object that points to an array of unsigned 8-bit integers. More...
 
typedef std::function< void(SharedPtr< IAsyncResult >)> AsyncCallback
 A delegate type that represents a method to be called when asynchronous operation completes. More...
 
template<class TInput , class TOutput >
using Converter = MulticastDelegate< TOutput(TInput)>
 
template<class... Args>
using Event = MulticastDelegate< Args... >
 
typedef SharedPtr< EventArgsEventArgsPtr
 Shared pointer to an instance of EventArgs class. More...
 
using ExceptionPtr = System::SmartPtr< Details_Exception >
 Type alias used by exception wrappers. More...
 
using Exception = ExceptionWrapper< Details_Exception >
 Alias to be used instead of Details::Exception. More...
 
typedef SharedPtr< IAsyncResultIAsyncResultPtr
 Shared pointer to IAsyncResult. More...
 
template<class T >
using Predicate = MulticastDelegate< bool(T)>
 
template<typename T >
using ArrayPtr = SmartPtr< Array< T > >
 Alias for 'pointer to array' type. More...
 
template<typename T >
using SharedPtr = SmartPtr< T >
 Alias for smart pointer widely used in the library. More...
 
typedef SharedPtr< StringComparerStringComparerPtr
 An alias for a shared pointer to an instance of StringComparer class. More...
 
typedef SharedPtr< TimeZoneTimeZonePtr
 Shared pointer to an instance of TimeZone class. More...
 
typedef SharedPtr< TimeZoneInfoTimeZoneInfoPtr
 Alias for shared pointer to an instance of TimeZoneInfo class. More...
 

Enumerations

enum  Base64FormattingOptions { Base64FormattingOptions::None = 0, Base64FormattingOptions::InsertLineBreaks = 1 }
 Enumeration containing values that represent different formats of base-64 encoded data. More...
 
enum  DateTimeKind { DateTimeKind::Unspecified, DateTimeKind::Utc, DateTimeKind::Local }
 Enumeration values of which represent the kinds of date and time. More...
 
enum  DayOfWeek : int {
  DayOfWeek::Sunday = 0, DayOfWeek::Monday, DayOfWeek::Tuesday, DayOfWeek::Wednesday,
  DayOfWeek::Thursday, DayOfWeek::Friday, DayOfWeek::Saturday
}
 Enumeration that represents a day of week. More...
 
enum  EnvironmentVariableTarget { Process = 0, User = 1, Machine = 2 }
 Specifies the environment variable location. More...
 
enum  MidpointRounding { MidpointRounding::ToEven, MidpointRounding::AwayFromZero }
 Specifies the behavior of rounding functions. More...
 
enum  PlatformID {
  PlatformID::Win32S = 0, PlatformID::Win32Windows = 1, PlatformID::Win32NT = 2, PlatformID::WinCE = 3,
  PlatformID::Unix = 4, PlatformID::Xbox = 5, PlatformID::MacOSX = 6
}
 Represents an operating system platform. More...
 
enum  SmartPtrMode : char { SmartPtrMode::Shared, SmartPtrMode::Weak }
 
enum  StringSplitOptions { StringSplitOptions::None = 0, StringSplitOptions::RemoveEmptyEntries = 1 }
 Determines string splitting behavior. More...
 
enum  StringComparison {
  StringComparison::CurrentCulture = 0, StringComparison::CurrentCultureIgnoreCase = 1, StringComparison::InvariantCulture = 2, StringComparison::InvariantCultureIgnoreCase = 3,
  StringComparison::Ordinal = 4, StringComparison::OrdinalIgnoreCase = 5
}
 Defines string comparison style. More...
 
enum  TypeCode {
  TypeCode::Empty = 0, TypeCode::Object = 1, TypeCode::DBNull = 2, TypeCode::Boolean = 3,
  TypeCode::Char = 4, TypeCode::SByte = 5, TypeCode::Byte = 6, TypeCode::Int16 = 7,
  TypeCode::UInt16 = 8, TypeCode::Int32 = 9, TypeCode::UInt32 = 10, TypeCode::Int64 = 11,
  TypeCode::UInt64 = 12, TypeCode::Single = 13, TypeCode::Double = 14, TypeCode::Decimal = 15,
  TypeCode::DateTime = 16, TypeCode::String = 18
}
 Represents the type of an object. More...
 
enum  UriKind { UriKind::RelativeOrAbsolute = 0, UriKind::Absolute = 1, UriKind::Relative = 2 }
 Represents the kinds of URIs. More...
 
enum  UriComponents {
  UriComponents::Scheme = 0x1, UriComponents::UserInfo = 0x2, UriComponents::Host = 0x4, UriComponents::Port = 0x8,
  UriComponents::SchemeAndServer = Scheme | Host | Port, UriComponents::Path = 0x10, UriComponents::Query = 0x20, UriComponents::PathAndQuery = Path | Query,
  UriComponents::HttpRequestUrl = Scheme | Host | Port | Path | Query, UriComponents::Fragment = 0x40, UriComponents::AbsoluteUri = Scheme | UserInfo | Host | Port | Path | Query | Fragment, UriComponents::StrongPort = 0x80,
  UriComponents::HostAndPort = Host | StrongPort, UriComponents::StrongAuthority = UserInfo | Host | StrongPort, UriComponents::NormalizedHost = 0x100, UriComponents::KeepDelimiter = 0x40000000,
  UriComponents::SerializationInfoString = static_cast<int32_t>(0x80000000)
}
 Represents URI components. More...
 
enum  UriFormat { UriFormat::UriEscaped = 1, UriFormat::Unescaped = 2, UriFormat::SafeUnescaped = 3 }
 Specifies how the URI is escaped. More...
 
enum  UriHostNameType {
  UriHostNameType::Unknown = 0, UriHostNameType::Basic = 1, UriHostNameType::Dns = 2, UriHostNameType::IPv4 = 3,
  UriHostNameType::IPv6 = 4
}
 Represents the type of host name. More...
 
enum  UriPartial { UriPartial::Scheme = 0, UriPartial::Authority = 1, UriPartial::Path = 2, UriPartial::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)
 
template<class T , class... Args>
ArrayPtr< T > MakeArray (Args &&... args)
 
template<class T , class Integral , class... Args>
std::enable_if< std::is_integral< Integral >::value, ArrayPtr< T > >::type MakeArray (Integral size, Args &&... args)
 
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)
 
void PrintTo (const System::DateTime &value, std::ostream *stream)
 Prints value to ostream. Mostly used for debug. More...
 
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 &)
 
auto operator- (DayOfWeek a, DayOfWeek b)
 
template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Decimal operator+ (const T &x, const Decimal &d)
 
template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Decimal operator- (const T &x, const Decimal &d)
 
template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Decimal operator* (const T &x, const Decimal &d)
 
template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Decimal operator/ (const T &x, const Decimal &d)
 
ASPOSECPP_SHARED_API void PrintTo (const Decimal &d, ::std::ostream *os)
 
template<typename T >
const std::enable_if< IsBoxable< T >::value &&!IsExceptionWrapper< T >::value, T & >::type Default ()
 
template<typename T >
const std::enable_if< IsExceptionWrapper< T >::value, T & >::type Default ()
 
template<typename T >
const std::enable_if<!IsBoxable< T >::value &&!IsExceptionWrapper< T >::value &&!IsSmartPtr< T >::value, T & >::type Default ()
 
template<typename T >
const std::enable_if<!IsBoxable< T >::value &&IsSmartPtr< T >::value, System::SharedPtr< typename T::Pointee_ > & >::type Default ()
 
template<typename T , typename F >
std::enable_if_t< Details::is_lambda_void_void< T >::value > DoTryFinally (T &&tryBlock, F &&finallyBlock)
 
template<typename T , typename F >
std::enable_if_t< Details::is_lambda_void_boolref< T >::value, bool > DoTryFinally (T &&tryBlock, F &&finallyBlock)
 
template<typename T , typename F >
std::enable_if_t< Details::is_lambda_nonovoid_boolref< T >::value, std::experimental::optional< std::result_of_t< T(bool &)> > > DoTryFinally (T &&tryBlock, F &&finallyBlock)
 
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 porter when passing function arguments by reference. More...
 
template<typename T , typename Enumerable >
std::enable_if_t<!Details::IsIterable< Enumerable >::value, Details::EnumeratorAdapter< Enumerable, T > > IterateOver (System::SmartPtr< Enumerable > enumerable)
 
template<typename Enumerable >
std::enable_if_t<!Details::IsIterable< Enumerable >::value, Details::EnumeratorAdapter< Enumerable > > IterateOver (System::SmartPtr< Enumerable > enumerable)
 
template<typename Enumerable >
std::enable_if_t< Details::IsIterable< Enumerable >::value, System::SmartPtr< Enumerable > > IterateOver (System::SmartPtr< Enumerable > 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)
 
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)
 
template<typename Enumerable >
std::enable_if_t<!IsSmartPtr< Enumerable >::value, Details::EnumeratorAdapter< Enumerable, Details::ValueTypeOfEnumerable< Enumerable >, Enumerable * > > IterateOver (Enumerable *enumerable)
 
template<typename T , typename Enumerable >
std::enable_if_t<!IsSmartPtr< Enumerable >::value, Details::EnumeratorAdapter< Enumerable, T, Enumerable * > > IterateOver (Enumerable *enumerable)
 
template<typename T >
std::enable_if< std::is_scalar< T >::value, int >::type GetHashCode (const T &obj)
 
template<typename T >
std::enable_if<!std::is_scalar< T >::value &&System::IsSmartPtr< T >::value, int >::type GetHashCode (const T &obj)
 
template<typename T >
std::enable_if< System::IsExceptionWrapper< T >::value, int >::type GetHashCode (const T &obj)
 
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)
 
template<>
int GetHashCode (const std::thread::id &id)
 Specialization for std::thread::id; Returns the hash code for the specified thread object. More...
 
template<typename T >
std::enable_if< IsNullable< T >::value, bool >::type operator!= (std::nullptr_t, const T &other)
 
template<typename T >
std::enable_if< IsNullable< T >::value, bool >::type operator> (std::nullptr_t, const T &)
 Always returns false. More...
 
template<typename T >
std::enable_if< IsNullable< T >::value, bool >::type operator< (std::nullptr_t, const T &)
 Always returns false. More...
 
template<typename T >
std::enable_if< IsNullable< T >::value, bool >::type operator>= (std::nullptr_t, const T &)
 Always returns false. More...
 
template<typename T >
std::enable_if< IsNullable< T >::value, bool >::type operator<= (std::nullptr_t, const T &)
 Always returns false. More...
 
template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value &&IsNullable< T2 >::value, bool >::type operator== (const T1 &some, const T2 &other)
 
template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value &&IsNullable< T2 >::value, bool >::type operator!= (const T1 &some, const T2 &other)
 
template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value &&IsNullable< T2 >::value, bool >::type operator> (const T1 &some, const T2 &other)
 
template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value &&IsNullable< T2 >::value, bool >::type operator< (const T1 &some, const T2 &other)
 
template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value &&IsNullable< T2 >::value, bool >::type operator>= (const T1 &some, const T2 &other)
 
template<typename T1 , typename T2 >
std::enable_if<!IsNullable< T1 >::value &&IsNullable< T2 >::value, bool >::type operator<= (const T1 &some, const T2 &other)
 
template<typename T >
std::enable_if<!IsNullable< T >::value &&std::is_class< T >::value, Nullable< T > >::type operator+ (std::nullptr_t, const T &)
 Always returns a default-constructed instance of the Nullable<T> class representing the null value. More...
 
template<typename T >
std::enable_if< IsNullable< T >::value, T >::type operator+ (std::nullptr_t, const T &)
 Always returns a default-constructed instance of the Nullable<T> class representing the null value. More...
 
template<typename T >
std::enable_if<!IsNullable< T >::value &&std::is_class< T >::value, Nullable< T > >::type operator+ (const T &, std::nullptr_t)
 Always returns a default-constructed instance of the Nullable<T> class representing the null value. More...
 
template<typename T >
std::enable_if< IsNullable< T >::value, T >::type operator+ (const T &, std::nullptr_t)
 Always returns a default-constructed instance of the Nullable<T> class representing the null value. More...
 
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())>
 
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())>
 
template<typename T >
SmartPtr< ObjectMemberwiseClone (T *ptr)
 
template<typename TA , typename TB >
bool Equals (const TA &a, const TB &b)
 
template<>
bool Equals< float, float > (const float &a, const float &b)
 
template<>
bool Equals< double, double > (const double &a, const double &b)
 
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)
 
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)
 
template<typename T >
bool IsNaN (const T &value)
 
template<typename T >
bool IsInfinity (const T &value)
 
template<typename T >
bool IsPositiveInfinity (const T &value)
 
template<typename T >
bool IsNegativeInfinity (const T &value)
 
template<typename TTo , typename TFrom >
TTo CheckedCast (TFrom value)
 
template<typename F >
ScopeGuard< F > MakeScopeGuard (F f)
 
template<typename T , typename T2 >
setter_wrap (void(*pSetter)(T2), T value)
 
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)
 
template<typename T >
setter_increment_wrap (T(*pGetter)(), void(*pSetter)(T))
 
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))
 
template<typename T >
setter_post_increment_wrap (T(*pGetter)(), void(*pSetter)(T))
 
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))
 
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))
 
template<typename T >
setter_decrement_wrap (T(*pGetter)(), void(*pSetter)(T))
 
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))
 
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))
 
template<typename T >
setter_post_decrement_wrap (T(*pGetter)(), void(*pSetter)(T))
 
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))
 
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))
 
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. More...
 
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. More...
 
template<class X , class Y >
bool operator== (const SmartPtr< X > &x, const SmartPtr< Y > &y)
 Equal-compares two smart pointers. More...
 
template<class X , class Y >
bool operator!= (const SmartPtr< X > &x, const SmartPtr< Y > &y)
 Non-equal-compares two smart pointers. More...
 
template<class X >
bool operator== (std::nullptr_t, SmartPtr< X > const &x)
 Checks if smart pointer is null. More...
 
template<class X >
bool operator!= (SmartPtr< X > const &x, std::nullptr_t)
 Checks if smart pointer is not null. More...
 
template<class X >
bool operator!= (std::nullptr_t, SmartPtr< X > const &x)
 Checks if smart pointer is not null. More...
 
template<class T >
std::enable_if<!std::is_scalar< T >::value &&!std::is_pointer< T >::value &&!std::is_array< T >::value, bool >::type operator== (T const &x, std::nullptr_t)
 Checks if value type object (ported C# structure, etc.) is null. More...
 
template<class T >
std::enable_if<!std::is_scalar< T >::value &&!std::is_pointer< T >::value &&!std::is_array< T >::value, bool >::type operator== (std::nullptr_t, T const &x)
 Checks if value type object (ported C# structure, etc.) is null. More...
 
template<class X >
SmartPtr< X > MakeSharedPtr (X *p)
 Converts raw pointer to smart pointer. More...
 
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 ported as const. More...
 
template<class Y , class X >
SmartPtr< Y > static_pointer_cast (SmartPtr< X > const &x)
 Casts smart pointers using static_cast. More...
 
template<class Y , class X >
SmartPtr< Y > dynamic_pointer_cast (SmartPtr< X > const &x)
 Casts smart pointers using dynamic_cast. More...
 
template<class Y , class X >
SmartPtr< Y > const_pointer_cast (SmartPtr< X > const &x)
 Casts smart pointers using const_cast. More...
 
template<class T >
T * get_pointer (System::SmartPtr< T > const &x)
 Gets referenced object of smart pointer. More...
 
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. More...
 
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)
 
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)
 
template<class To , class From >
std::enable_if< System::IsSmartPtr< To >::value &&System::detail::has_method_get_Count< From >::value, Collections::Generic::ListPtr< To > >::type DynamicCastEnumerableTo (const From &enumerable)
 
template<class To , class From >
std::enable_if< System::IsSmartPtr< To >::value &&!System::detail::has_method_get_Count< From >::value, Collections::Generic::ListPtr< To > >::type DynamicCastEnumerableTo (const From &enumerable)
 
template<class To , class From >
std::enable_if<(!System::IsSmartPtr< To >::value), Collections::Generic::ListPtr< To > >::type DynamicCastEnumerableTo (const From &enumerable)
 
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)
 
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)
 
template<class To , class From >
SharedPtr< Array< To > > DynamicCastArray (const SharedPtr< Array< From >> &from)
 
template<typename T >
std::enable_if< IsStringLiteral< T, char_t >::value, String >::type operator+ (T &left, const String &right)
 
template<typename T >
std::enable_if< IsStringPointer< T, char_t >::value, String >::type operator+ (T &left, const String &right)
 
String operator+ (const char_t left, const String &right)
 
template<class Chars , typename std::enable_if< IsStringLiteral< Chars, char_t >::value >::type * = nullptr>
bool operator== (Chars &left, const String &right)
 
template<class T , typename std::enable_if< IsStringPointer< T, char_t >::value >::type * = nullptr>
bool operator== (T &left, const String &right)
 
template<class Chars , typename std::enable_if< IsStringLiteral< Chars, char_t >::value >::type * = nullptr>
bool operator!= (Chars &left, const String &right)
 
template<class T , typename std::enable_if< IsStringPointer< T, char_t >::value >::type * = nullptr>
bool operator!= (T &left, const String &right)
 
ASPOSECPP_SHARED_API bool operator== (const SharedPtr< Object > &left, const String &right)
 
ASPOSECPP_SHARED_API bool operator!= (const SharedPtr< Object > &left, const String &right)
 
ASPOSECPP_SHARED_API bool operator== (std::nullptr_t, const String &str)
 
ASPOSECPP_SHARED_API bool operator!= (std::nullptr_t, const String &str)
 
ASPOSECPP_SHARED_API void PrintTo (const System::String &value, std::ostream *os)
 
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)
 
void PrintTo (const System::TimeSpan &value, std::ostream *stream)
 Prints value to ostream. Mostly used for debug. More...
 
ASPOSECPP_SHARED_API bool operator== (const SharedPtr< Uri > &uri1, const SharedPtr< Uri > &uri2)
 
ASPOSECPP_SHARED_API bool operator!= (const SharedPtr< Uri > &uri1, const SharedPtr< Uri > &uri2)
 
 DECLARE_ENUM_OPERATORS (System::UriComponents)
 
 DECLARE_ENUM_OPERATORS (System::UriFormat)
 

Variables

template<typename T >
decltype(Ref(std::declval< T & >())) Ref (const std::reference_wrapper< T > &wrapper)
 Wrapper to make sure Ref(std::ref(DynamicWeakPtr)) works. More...
 

Typedef Documentation

◆ Action

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

Delegate type that references methods that have no return value.

Template Parameters
ArgsArgument list of the methods the delegate references.

◆ ArrayPtr

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

Alias for 'pointer to array' type.

Template Parameters
TArray element type.

◆ AsyncCallback

typedef std::function<void(SharedPtr<IAsyncResult>)> System::AsyncCallback

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

◆ 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 = typedef 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

◆ Event

template<class... Args>
using System::Event = typedef 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.

◆ Exception

using System::Exception = typedef ExceptionWrapper<Details_Exception>

Alias to be used instead of Details::Exception.

◆ ExceptionPtr

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

Type alias used by exception wrappers.

◆ IAsyncResultPtr

◆ Predicate

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

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

Template Parameters
TThe type of the argument accepted by the invokable entity pointed to by the Predicate delegate type.

◆ SharedPtr

template<typename T >
using System::SharedPtr = typedef SmartPtr<T>

Alias for smart pointer widely used in the library.

Template Parameters
TPointee type.

◆ 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 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 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

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 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 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

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

Determines string splitting behavior.

Enumerator
None 

Keep empty strings when splitting string.

RemoveEmptyEntries 

Discard empty strings when splitting string.

◆ TypeCode

enum 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 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 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

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 System::UriKind
strong

Represents the kinds of URIs.

Enumerator
RelativeOrAbsolute 

Undetermined kind.

Absolute 

Absolute URI.

Relative 

Relative URI.

◆ UriPartial

enum 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

◆ 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 static 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 static 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.

◆ DECLARE_ENUM_OPERATORS() [1/2]

System::DECLARE_ENUM_OPERATORS ( System::UriComponents  )

◆ DECLARE_ENUM_OPERATORS() [2/2]

System::DECLARE_ENUM_OPERATORS ( System::UriFormat  )

◆ Default() [1/4]

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

Returns the default-constructed instance of the specified type.

Template Parameters
TThe type whose instance is returned

◆ Default() [2/4]

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

Returns the default-constructed instance of the specified type.

Template Parameters
TThe type whose instance is returned

◆ Default() [3/4]

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

Returns the default-constructed instance of the specified type.

Template Parameters
TThe type whose instance is returned

◆ Default() [4/4]

template<typename T >
const std::enable_if<!IsBoxable<T>::value && IsSmartPtr<T>::value, System::SharedPtr<typename T::Pointee_>&>::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 Porting of C#'s try[-catch]-finally statement with Porter'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 Porting of C#'s try[-catch]-finally statement with Porter'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::experimental::optional<std::result_of_t<T(bool&)> > > System::DoTryFinally ( T &&  tryBlock,
F &&  finallyBlock 
)

The sigle function that emulates behavior of C#'s try[-catch]-finally statement. During Porting of C#'s try[-catch]-finally statement with Porter'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.

◆ DynamicCastArray()

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

Performs the dynamic 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

◆ DynamicCastEnumerableTo() [1/3]

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

Performs the dynamic 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

◆ DynamicCastEnumerableTo() [2/3]

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

Performs the dynamic 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

◆ DynamicCastEnumerableTo() [3/3]

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

Performs the dynamic 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

◆ 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

◆ 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<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() [2/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() [3/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() [4/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

◆ GetHashCode() [5/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.

◆ 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 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() [2/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() [3/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() [4/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() [5/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

◆ IterateOver() [6/7]

template<typename Enumerable >
std::enable_if_t<!IsSmartPtr<Enumerable>::value, Details::EnumeratorAdapter<Enumerable, Details::ValueTypeOfEnumerable<Enumerable>, Enumerable*> > System::IterateOver ( 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() [7/7]

template<typename T , typename Enumerable >
std::enable_if_t<!IsSmartPtr<Enumerable>::value, Details::EnumeratorAdapter<Enumerable, T, Enumerable*> > System::IterateOver ( 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

◆ MakeArray() [1/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

◆ MakeArray() [2/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() [3/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.

◆ 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)

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 ( X *  p)

Converts raw pointer to smart pointer.

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 ( const X *  p)

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

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.

◆ operator!=() [1/14]

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

◆ operator!=() [2/14]

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!=() [3/14]

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

◆ operator!=() [4/14]

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

◆ operator!=() [5/14]

template<typename T >
std::enable_if<IsNullable<T>::value, bool>::type System::operator!= ( std::nullptr_t  ,
const 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!=() [6/14]

template<typename T1 , typename T2 >
std::enable_if<!IsNullable<T1>::value && IsNullable<T2>::value, bool>::type System::operator!= ( const T1 &  some,
const 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!=() [7/14]

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

◆ operator!=() [8/14]

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!=() [9/14]

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!=() [10/14]

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!=() [11/14]

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!=() [12/14]

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!=() [13/14]

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!=() [14/14]

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*()

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/9]

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+() [2/9]

template<typename T >
std::enable_if<!IsNullable<T>::value && std::is_class<T>::value, Nullable<T> >::type System::operator+ ( std::nullptr_t  ,
const T &   
)

Always returns a default-constructed instance of the Nullable<T> class representing the null value.

◆ operator+() [3/9]

template<typename T >
std::enable_if<IsNullable<T>::value, T>::type System::operator+ ( std::nullptr_t  ,
const T &   
)

Always returns a default-constructed instance of the Nullable<T> class representing the null value.

◆ operator+() [4/9]

template<typename T >
std::enable_if<!IsNullable<T>::value && std::is_class<T>::value, Nullable<T> >::type System::operator+ ( const T &  ,
std::nullptr_t   
)

Always returns a default-constructed instance of the Nullable<T> class representing the null value.

◆ operator+() [5/9]

template<typename T >
std::enable_if<IsNullable<T>::value, T>::type System::operator+ ( const T &  ,
std::nullptr_t   
)

Always returns a default-constructed instance of the Nullable<T> class representing the null value.

◆ operator+() [6/9]

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+() [7/9]

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+() [8/9]

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+() [9/9]

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-() [1/3]

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-() [2/3]

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-() [3/3]

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())>

Substracts non-nullable and nullable values.

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

◆ 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]

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

◆ operator<() [2/5]

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

◆ operator<() [3/5]

template<typename T >
std::enable_if<IsNullable<T>::value, bool>::type System::operator< ( std::nullptr_t  ,
const T &   
)

Always returns false.

◆ operator<() [4/5]

template<typename T1 , typename T2 >
std::enable_if<!IsNullable<T1>::value && IsNullable<T2>::value, bool>::type System::operator< ( const T1 &  some,
const 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<() [5/5]

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

◆ operator<=() [1/5]

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

◆ operator<=() [2/5]

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

◆ operator<=() [3/5]

template<typename T >
std::enable_if<IsNullable<T>::value, bool>::type System::operator<= ( std::nullptr_t  ,
const T &   
)

Always returns false.

◆ operator<=() [4/5]

template<typename T1 , typename T2 >
std::enable_if<!IsNullable<T1>::value && IsNullable<T2>::value, bool>::type System::operator<= ( const T1 &  some,
const 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<=() [5/5]

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

◆ operator==() [1/14]

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

◆ operator==() [2/14]

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==() [3/14]

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

◆ operator==() [4/14]

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

◆ operator==() [5/14]

template<typename T1 , typename T2 >
std::enable_if<!IsNullable<T1>::value && IsNullable<T2>::value, bool>::type System::operator== ( const T1 &  some,
const 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==() [6/14]

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

◆ operator==() [7/14]

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==() [8/14]

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==() [9/14]

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==() [10/14]

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==() [11/14]

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==() [12/14]

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==() [13/14]

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

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

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

◆ operator==() [14/14]

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

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

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

◆ operator>() [1/5]

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

◆ operator>() [2/5]

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

◆ operator>() [3/5]

template<typename T >
std::enable_if<IsNullable<T>::value, bool>::type System::operator> ( std::nullptr_t  ,
const T &   
)

Always returns false.

◆ operator>() [4/5]

template<typename T1 , typename T2 >
std::enable_if<!IsNullable<T1>::value && IsNullable<T2>::value, bool>::type System::operator> ( const T1 &  some,
const 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>() [5/5]

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

◆ operator>=() [1/5]

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

◆ operator>=() [2/5]

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

◆ operator>=() [3/5]

template<typename T >
std::enable_if<IsNullable<T>::value, bool>::type System::operator>= ( std::nullptr_t  ,
const T &   
)

Always returns false.

◆ operator>=() [4/5]

template<typename T1 , typename T2 >
std::enable_if<!IsNullable<T1>::value && IsNullable<T2>::value, bool>::type System::operator>= ( const T1 &  some,
const 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>=() [5/5]

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

◆ PrintTo() [1/4]

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/4]

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

Prints value to ostream. Mostly used for debug.

◆ PrintTo() [3/4]

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

Prints value to ostream. Mostly used for debug.

◆ PrintTo() [4/4]

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.

◆ Ref() [1/2]

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 porter 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() [2/2]

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 >
T System::setter_decrement_wrap ( T(*)()  pGetter,
void(*)(T)  pSetter 
)
inline

Porter 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_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::*)(T)  pSetter 
)
inline

Porter 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 , 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::*)() const  pGetter,
void(HostSet::*)(T)  pSetter 
)
inline

Porter 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_increment_wrap() [1/2]

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

Porter 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_increment_wrap() [2/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::*)(T)  pSetter 
)
inline

Porter 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_post_decrement_wrap() [1/3]

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

Porter 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_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::*)(T)  pSetter 
)
inline

Porter 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 , 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::*)() const  pGetter,
void(HostSet::*)(T)  pSetter 
)
inline

Porter 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_increment_wrap() [1/3]

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

Porter 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_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::*)(T)  pSetter 
)
inline

Porter 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 , 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::*)() const  pGetter,
void(HostSet::*)(T)  pSetter 
)
inline

Porter 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_wrap() [1/2]

template<typename T , typename T2 >
T System::setter_wrap ( void(*)(T2)  pSetter,
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.

◆ setter_wrap() [2/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::*)(T2)  pSetter,
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.

◆ 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.

◆ 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 the static 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

◆ 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 the static 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

Variable Documentation

◆ Ref

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.