System Namespace Reference

Namespaces

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

Classes

class  Array
 
class  AsposeCppLibrary
 
class  Attribute
 
class  BaseTypesInfo
 
class  BaseTypesInfo< FirstType, BaseTypes... >
 
class  BaseTypesInfo<>
 Specialization of an instance of a type that has no parent types. More...
 
class  BitConverter
 
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  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
 Namespace name alias. More...
 
class  DBNull
 
class  Decimal
 
class  DefaultBoxedValue
 
class  Delegate
 
class  Delegate< ReturnType(ArgumentTypes...)>
 
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  Exception
 
class  Func
 
class  GC
 
class  Guid
 
class  IAsyncResult
 
class  ICloneable
 
class  IComparable
 
class  IConvertible
 
class  ICustomFormatter
 
class  IDisposable
 
class  IEnumerableAdapter
 
class  IEnumeratorIterator
 
class  IEquatable
 
class  IFormatProvider
 
struct  IsBoxable
 
struct  IsBoxable< Collections::Generic::KeyValuePair< TKey, TValue > >
 
struct  IsBoxable< DateTime >
 Specialization for DateTime. More...
 
struct  IsBoxable< Decimal >
 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 >
 Specialization for Guid. More...
 
struct  IsBoxable< Nullable< T > >
 Specialization for Nullable. More...
 
struct  IsBoxable< String >
 Specialization for String. More...
 
struct  IsBoxable< TimeSpan >
 Specialization for TimeSpan. More...
 
struct  IsBoxable< ValueType >
 Specialization for ValueType. More...
 
struct  IsBoxedValue
 
struct  IsBoxedValue< BoxedValue< T > >
 
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(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  ScopeGuard
 
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
 
class  Uri
 
class  UriBuilder
 
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...
 

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...
 
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  TimeSpanStyles { TimeSpanStyles::None = 0x00000000, TimeSpanStyles::AssumeNegative = 0x00000001 }
 Specifies the formatting options that customize string parsing for methods that convert a string representation of a time interval into Timespan object. 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  UriHostNameType {
  UriHostNameType::Unknown = 0, UriHostNameType::Basic = 1, UriHostNameType::Dns = 2, UriHostNameType::IPv4 = 3,
  UriHostNameType::IPv6 = 4
}
 Represents the type of host name. More...
 
enum  UriKind { UriKind::RelativeOrAbsolute = 0, UriKind::Absolute = 1, UriKind::Relative = 2 }
 Represents the kinds of URIs. More...
 
enum  UriComponents {
  UriComponents::Scheme = 1, UriComponents::UserInfo = 2, UriComponents::Host = 4, UriComponents::Port = 8,
  UriComponents::SchemeAndServer = 13, UriComponents::Path = 16, UriComponents::Query = 32, UriComponents::PathAndQuery = 48,
  UriComponents::HttpRequestUrl = 61, UriComponents::Fragment = 64, UriComponents::AbsoluteUri = 127, UriComponents::StrongPort = 128,
  UriComponents::HostAndPort = 132, UriComponents::StrongAuthority = 134, UriComponents::KeepDelimiter = 1073741824
}
 Represents URI components. More...
 
enum  UriFormat { UriFormat::UriEscaped = 1, UriFormat::Unescaped = 2, UriFormat::SafeUnescaped = 3 }
 Specifies how the URI is escaped. 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)
 
int operator- (DayOfWeek a, DayOfWeek b)
 
bool operator!= (std::nullptr_t, DateTime &)
 Always returns true. More...
 
bool operator< (std::nullptr_t, DateTime &)
 Always returns false. More...
 
bool operator<= (std::nullptr_t, DateTime &)
 Always returns false. More...
 
bool operator> (std::nullptr_t, DateTime &)
 Always returns false. More...
 
bool operator>= (std::nullptr_t, DateTime &)
 Always returns false. More...
 
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)
 
void PrintTo (const Decimal &d, ::std::ostream *os)
 
template<typename T >
const std::enable_if< IsBoxable< T >::value &&!IsException< T >::value, T & >::type Default ()
 
template<typename T >
const std::enable_if< IsException< T >::value, T & >::type Default ()
 
template<typename T >
const std::enable_if<!IsBoxable< T >::value &&!IsException< T >::value &&!IsSmartPtr< T >::value, System::SharedPtr< T > & >::type Default ()
 
template<typename T >
const std::enable_if<!IsBoxable< T >::value &&!IsException< T >::value &&IsSmartPtr< T >::value, T & >::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 >
std::enable_if< std::is_scalar< T >::value &&sizeof(T)==sizeof(int64_t), int >::type GetHashCode (const T &obj)
 
template<typename T >
std::enable_if< std::is_scalar< T >::value &&sizeof(T)==sizeof(int32_t), int >::type GetHashCode (const T &obj)
 
template<typename T >
std::enable_if< std::is_scalar< T >::value &&sizeof(T) !=sizeof(int32_t) &&sizeof(T) !=sizeof(int64_t), 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<!std::is_scalar< T >::value &&!System::IsSmartPtr< 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, int>::type, typename = typename std::enable_if<IsNullable<T2>::value, int>::type>
auto operator+ (const T1 &some, const T2 &other) -> System::Nullable< decltype(some+other.get_Value())>
 
template<typename T1 , typename T2 , typename = typename std::enable_if<!IsNullable<T1>::value, int>::type, typename = typename std::enable_if<IsNullable<T2>::value, int>::type>
auto operator- (const T1 &some, const T2 &other) -> System::Nullable< decltype(some - other.get_Value())>
 
template<typename TTo , typename TFrom >
static CastResult< TTo >::type StaticCast_noexcept (SmartPtr< TFrom > obj)
 
template<typename TTo , typename TFrom >
static CastResult< TTo >::type StaticCast (SmartPtr< TFrom > obj)
 
template<typename TTo , typename TFrom >
static CastResult< TTo >::type StaticCast_noexcept (WeakPtr< TFrom > obj)
 
template<typename TTo , typename TFrom >
static CastResult< TTo >::type StaticCast (WeakPtr< TFrom > obj)
 
template<typename TTo >
static CastResult< TTo >::type StaticCast (std::nullptr_t)
 
template<typename TTo , typename TFrom >
static std::enable_if< std::is_arithmetic< TFrom >::value, TTo >::type StaticCast (TFrom value)
 Specialization for arithmetic types. More...
 
template<typename TTo , typename TFrom >
static std::enable_if< std::is_arithmetic< TFrom >::value, TTo >::type StaticCast (const TFrom *value)
 Specialization for arithmetic types. More...
 
template<typename TTo , typename TFrom >
static std::enable_if<!IsSmartPtr< TFrom >::value &&!std::is_arithmetic< TFrom >::value, TTo >::type StaticCast (TFrom &obj)
 
template<typename TTo , typename TFrom >
static CastResult< TTo >::type DynamicCast_noexcept (SmartPtr< TFrom > obj) noexcept
 
template<typename TTo , typename TFrom >
static std::enable_if<!std::is_enum< TTo >::value, typename CastResult< TTo >::type >::type DynamicCast (SmartPtr< TFrom > obj)
 
template<typename TTo , typename TFrom >
static std::enable_if< std::is_enum< TTo >::value, TTo >::type DynamicCast (SmartPtr< TFrom > obj)
 
template<typename TTo >
static CastResult< TTo >::type DynamicCast (std::nullptr_t) noexcept
 
template<typename TTo , typename TFrom >
static std::enable_if< !IsSmartPtr< TFrom >::value &&std::is_convertible< TTo, TFrom >::value, TTo >::type DynamicCast (TFrom &obj)
 
template<typename TTo , typename TFrom >
static CastResult< TTo >::type ConstCast (const SmartPtr< TFrom > &obj)
 
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 >
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 >
setter_wrap (Host *const host, void(Host::*pSetter)(T2), T value)
 
template<typename T >
setter_increment_wrap (T(*pGetter)(), void(*pSetter)(T))
 
template<typename T , typename Host >
setter_increment_wrap (Host *const host, T(Host::*pGetter)(), void(Host::*pSetter)(T))
 
template<typename T >
setter_post_increment_wrap (T(*pGetter)(), void(*pSetter)(T))
 
template<typename T , typename Host >
setter_post_increment_wrap (Host *const host, T(Host::*pGetter)(), void(Host::*pSetter)(T))
 
template<typename T >
setter_decrement_wrap (T(*pGetter)(), void(*pSetter)(T))
 
template<typename T , typename Host >
setter_decrement_wrap (Host *const host, T(Host::*pGetter)(), void(Host::*pSetter)(T))
 
template<typename T >
setter_post_decrement_wrap (T(*pGetter)(), void(*pSetter)(T))
 
template<typename T , typename Host >
setter_post_decrement_wrap (Host *const host, T(Host::*pGetter)(), void(Host::*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 >
Collections::Generic::ListPtr< To > CastEnumerableTo (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<class To , class From >
std::enable_if<(!System::IsSmartPtr< To >::value), Collections::Generic::ListPtr< To > >::type DynamicCastEnumerableTo (const From &enumerable)
 
template<class To , class From >
SharedPtr< Array< To > > StaticCastArray (const SharedPtr< 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 T , typename std::enable_if< IsStringLiteral< T, char_t >::value >::type * = nullptr>
bool operator== (T &left, const String &right)
 
template<class T , typename std::enable_if< IsStringLiteral< T, char_t >::value >::type * = nullptr>
bool operator!= (T &left, const String &right)
 
bool operator== (const SharedPtr< Object > &left, const String &right)
 
bool operator!= (const SharedPtr< Object > &left, const String &right)
 
bool operator== (std::nullptr_t, const String &str)
 
bool operator!= (std::nullptr_t, const String &str)
 
void PrintTo (const System::String &value, std::ostream *os)
 

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.

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

◆ TimeSpanStyles

Specifies the formatting options that customize string parsing for methods that convert a string representation of a time interval into Timespan object.

Enumerator
None 

The time interval represented by the inptut string is interpreted as a negative time interval only if a negative sign is present.

AssumeNegative 

The time interval represented by the inptut string is interpreted as a negative time interval always.

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

KeepDelimiter 

Specifies that the delimiter should be included.

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

template<class To , class From >
Collections::Generic::ListPtr<To> 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

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

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

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

◆ const_pointer_cast()

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

Casts smart pointers using const_cast.

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

◆ ConstCast()

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

Performs const cast on SmartPtr objects.

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

◆ Default() [1/4]

template<typename T >
const std::enable_if<IsBoxable<T>::value && !IsException<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<IsException<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 && !IsException<T>::value && !IsSmartPtr<T>::value, System::SharedPtr<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 && !IsException<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

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

◆ DynamicCast() [1/4]

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

Performs dynamic cast on SmartPtr objects.

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

◆ DynamicCast() [2/4]

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

Unboxes boxed enum via cast.

Template Parameters
TToTarget enum type.
TFromSource pointee type.
Parameters
objPointer to the object to unbox data from.
Returns
Unboxed enum value.
Exceptions
InvalidCastExceptionif obj is not a boxed enum.

◆ DynamicCast() [3/4]

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

Performs dynamic cast of null objects.

Template Parameters
TToTarget pointee type.
Returns
nullptr.

◆ DynamicCast() [4/4]

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

Performs dynamic cast on non-pointer objects.

Template Parameters
TToTarget type.
TFromSource type.
Parameters
objSource object.
Returns
Cast result.

◆ DynamicCast_noexcept()

template<typename TTo , typename TFrom >
static CastResult<TTo>::type System::DynamicCast_noexcept ( SmartPtr< TFrom >  obj)
staticnoexcept

Performs dynamic cast on SmartPtr objects.

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

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

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

◆ DynamicCastEnumerableTo() [2/2]

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

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

Returns a hash code for the specified 64-bit 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/6]

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

Returns a hash code for the specified 32-bit scalar value.

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

◆ GetHashCode() [3/6]

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

Returns a hash code for the specified scalar value whose size is less than 32 bits.

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

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

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 which is not a smart pointer.

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

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

◆ MakeArray() [1/2]

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

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

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

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

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

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

Always returns true.

◆ operator!=() [4/9]

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

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

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

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

String comparison.

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

String comparison.

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

◆ operator!=() [8/9]

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

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

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, int>::type, typename = typename std::enable_if<IsNullable<T2>::value, int>::type>
auto System::operator+ ( const T1 &  some,
const 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]

int 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, int>::type, typename = typename std::enable_if<IsNullable<T2>::value, int>::type>
auto System::operator- ( const T1 &  some,
const 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/3]

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

Always returns false.

◆ operator<()>[2/3]

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

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

Always returns false.

◆ operator<=()>[1/3]

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

Always returns false.

◆ operator<=()>[2/3]

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

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

Always returns false.

◆ operator==() [1/8]

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

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

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

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

String comparison.

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

String comparison.

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

◆ operator==() [5/8]

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

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

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

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

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

Always returns false.

◆ operator>() [2/3]

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

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

Always returns false.

◆ operator>=() [1/3]

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

Always returns false.

◆ operator>=() [2/3]

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

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

Always returns false.

◆ PrintTo() [1/2]

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

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

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

template<typename T , typename Host >
T System::setter_decrement_wrap ( Host *const  host,
T(Host::*)()  pGetter,
void(Host::*)(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.
HostObject type.
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

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.
HostObject type.
Parameters
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 >
T System::setter_increment_wrap ( Host *const  host,
T(Host::*)()  pGetter,
void(Host::*)(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
HostThe class that contains the implmentation of the property's getter and setter

◆ setter_post_decrement_wrap() [1/2]

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

template<typename T , typename Host >
T System::setter_post_decrement_wrap ( Host *const  host,
T(Host::*)()  pGetter,
void(Host::*)(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.
HostObject type.
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

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.
HostObject type.
Parameters
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/2]

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

template<typename T , typename Host >
T System::setter_post_increment_wrap ( Host *const  host,
T(Host::*)()  pGetter,
void(Host::*)(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.
HostObject type.
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

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.
HostObject type.
Parameters
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 >
T System::setter_wrap ( Host *const  host,
void(Host::*)(T2)  pSetter,
value 
)
inline

Overload for instance setter functions with type conversion.

Template Parameters
TValue type.
T2Type expected by setter function.
HostInstance type.
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.

◆ StaticCast() [1/6]

template<typename TTo , typename TFrom >
static CastResult<TTo>::type System::StaticCast ( SmartPtr< TFrom >  obj)
static

Performs static cast on SmartPtr objects.

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

◆ StaticCast() [2/6]

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

Performs static cast on WeakPtr objects.

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

◆ StaticCast() [3/6]

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

Performs static cast of null objects.

Template Parameters
TToTarget pointee type.
Returns
nullptr.

◆ StaticCast() [4/6]

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

Specialization for arithmetic types.

◆ StaticCast() [5/6]

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

Specialization for arithmetic types.

◆ StaticCast() [6/6]

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

Performs static cast on non-pointer objects.

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

◆ StaticCast_noexcept() [1/2]

template<typename TTo , typename TFrom >
static CastResult<TTo>::type System::StaticCast_noexcept ( SmartPtr< TFrom >  obj)
static

Performs static cast on SmartPtr objects.

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

◆ StaticCast_noexcept() [2/2]

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

Performs static cast on WeakPtr objects.

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

◆ StaticCastArray()

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

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

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.