Asposecpplib
System::Collections::Generic Namespace Reference

Namespaces

 Details
 

Classes

class  _KeyCollection
 Collection of Dictionary's keys. References collection, doesn't copy anything. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  _KeyList
 Implements list of dictionary's keys. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  _ValueCollection
 Collection of Dictionary's values. References collection, doesn't copy anything. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  _ValueList
 Implements list of dictionary's values. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  ArrayList
 Array with dynamic resize. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  BaseDictionary
 Implements common code for various dictionary-alike data structures (e. g. Dictionary, SortedDictionary). Shouldn't be used directly, except for inheritance when defining containers. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  BaseEnumerator
 Enumerator definition to wrap STL-styled types for C#-styled usage. Makes no assertions on container structure except for existance of sequental iterator. Uses begin() and end() functions. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  BaseKVCollection
 Holds common code for collections of keys or values. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
struct  ComparerAdapter
 Adapter to use IComparer within STL environment. Uses IComparer if set; otherwise, uses operator < (if available) or returns false (if not). More...
 
class  DefaultComparer
 Default comparator class. Uses operator < and operator == to compare values. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  Dictionary
 Forward declaration of Dictionary class. More...
 
struct  DictionaryHashSelector
 Hash function selector for Dictionary class. This implementation uses STL hashing given no alternative is provided. More...
 
struct  DictionaryHashSelector< T, typename std::enable_if< std::is_enum< T >::value >::type >
 Hash function selector for Dictionary class. This implementation works for enums as STL doesn't.
 
struct  DictionaryHashSelector< T, typename std::enable_if< System::detail::has_method_gethashcode< T >::value >::type >
 Hash function selector for Dictionary class. This implementation uses GetHashCode function and applies to types providing such a function.
 
struct  DictionaryHashSelector< T, typename std::enable_if< System::detail::has_ref_method_gethashcode< T >::value &&!System::detail::has_method_gethashcode< T >::value >::type >
 Hash function selector for Dictionary class. This implementation uses GetHashCode function and applies to pointers to types providing such a function.
 
class  DictionaryPtr
 Dictionary pointer class with operator overloads. 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  EqualityComparerAdapter
 Adapter making it possible using IEqualityComparer with STL-styled collections and algorithms. Uses IEqualityComparer, if set. If not set, uses operator ==, Object::Equals or T::Equals, whichever is available. More...
 
struct  EqualityComparerHashAdapter
 Adapter to use IEqualityComparer for hashing. Uses comparator object, if set; otherwise, uses available hash method selected using DictionaryHashSelector struct. More...
 
class  HashDictionary
 Stub for HashDictionary class (not implemented currently). Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  HashSet
 Forward declaration of HashSet class. More...
 
class  HashSetPtr
 Pointer to keep HashSet references. 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  ICollection
 Interface of collection of elements. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  IComparer
 Interface that compares two objects in greater-equal-less sense. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  IDictionary
 Interface for dictionary-alike containers. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  IEnumerable
 Interface of object providing enumerator on contained elements. More...
 
class  IEnumerator
 Interface of enumerator which can be used to iterate through some elements. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  IEqualityComparer
 Interface providing means to compare two objects for equality. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  IKVCollection
 Interface of container containing keys or values of the dictionary-like container. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  IList
 Interface of indexed container of elements. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  ISet
 Interface of collection containing a set of unique elements. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  KeyValuePair
 Pair of key and value. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
 
class  KVPairIterator
 Adapting iterator, wraps std::pair into KVPair expected from Dictionary. More...
 
class  LinkedList
 LinkedList forward declaration. More...
 
class  LinkedListNode
 Node of linked list. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  List
 List forward declaration. More...
 
class  ListPtr
 List pointer with access operators. 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  Queue
 Queue class forward declaration. More...
 
class  QueuePtr
 Queue pointer. 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  ReverseEnumerator
 Enumerator that reverse-iterates through container. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  SimpleEnumerator
 Iterator class for simple containers holding elements directly using rbegin() and rend() functions. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  SortedDictionary
 Sorted dictionary type forward declaration. More...
 
class  SortedDictionaryPtr
 Sorted dictionary pointer with access operators. 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  SortedList
 Sorted list wrapping FlatMap structure. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  SortedListHelper
 This helper class is used to mask virtual fucntions get_Keys get_Values that come from IDictionary interface and substitute these to the fucntions with different return type. More...
 
class  Stack
 Stack class forward declaration. More...
 
class  StackPtr
 Stack pointer. 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...
 

Functions

template<template< typename, typename > class containterT, class T , class Allocator >
int _net_binnary_search (const containterT< T, Allocator > &container, int index, int count, T value, const SharedPtr< System::Collections::Generic::IComparer< T > > &comparer)
 Implements binary search in random access container. More...
 
template<template< typename, typename > class containterT, class T , class Allocator >
std::enable_if< IsSmartPtr< T >::value, int >::type _net_binnary_search (const containterT< T, Allocator > &container, int index, int count, T value)
 Implements binary search in random access container. Specialization for smart pointers. Uses System::Object::CompareTo method. More...
 
template<template< typename, typename > class containterT, class T , class Allocator >
std::enable_if<!IsSmartPtr< T >::value &&!std::is_scalar< T >::value, int >::type _net_binnary_search (const containterT< T, Allocator > &container, int index, int count, T value)
 Implements binary search in random access container. Specialization for value types. Uses CompareTo method. More...
 
template<template< typename, typename > class containterT, class T , class Allocator >
std::enable_if< std::is_scalar< T >::value, int >::type _net_binnary_search (const containterT< T, Allocator > &container, int index, int count, T value)
 Implements binary search in random access container. Specialization for scalar types. Compares elements using greater and less operators. More...
 
template<typename TKey , typename TValue >
bool operator== (const KeyValuePair< TKey, TValue > &left, const KeyValuePair< TKey, TValue > &right)
 Compares two key-value pairs using 'equals' semantics. Uses operator == or EqualsTo method for both keys and values, whichever is defined. More...
 
template<typename TKey , typename TValue >
bool operator!= (const KeyValuePair< TKey, TValue > &left, const KeyValuePair< TKey, TValue > &right)
 Compares two key-value pairs using inverse 'equals' semantics. More...
 

Function Documentation

◆ _net_binnary_search() [1/4]

template<template< typename, typename > class containterT, class T , class Allocator >
int System::Collections::Generic::_net_binnary_search ( const containterT< T, Allocator > &  container,
int  index,
int  count,
value,
const SharedPtr< System::Collections::Generic::IComparer< T > > &  comparer 
)

Implements binary search in random access container.

Template Parameters
containerTSTL-styled container template type with two template arguments: element type and allocator type.
TElement type.
AllocatorAllocator type.
Parameters
containerContainer to search in.
indexSearch range beginning index.
countSearch range length.
valueValue to look for.
comparerComparer object.
Returns
If found, index of the next element; otherwise, complements of index at which the search stopped.

◆ _net_binnary_search() [2/4]

template<template< typename, typename > class containterT, class T , class Allocator >
std::enable_if<IsSmartPtr<T>::value, int>::type System::Collections::Generic::_net_binnary_search ( const containterT< T, Allocator > &  container,
int  index,
int  count,
value 
)

Implements binary search in random access container. Specialization for smart pointers. Uses System::Object::CompareTo method.

Template Parameters
containerTSTL-styled container template type with two template arguments: element type and allocator type.
TElement type.
AllocatorAllocator type.
Parameters
containerContainer to search in.
indexSearch range beginning index.
countSearch range length.
valueValue to look for.
Returns
If found, index of the next element; otherwise, complements of index at which the search stopped.

◆ _net_binnary_search() [3/4]

template<template< typename, typename > class containterT, class T , class Allocator >
std::enable_if<!IsSmartPtr<T>::value && !std::is_scalar<T>::value, int>::type System::Collections::Generic::_net_binnary_search ( const containterT< T, Allocator > &  container,
int  index,
int  count,
value 
)

Implements binary search in random access container. Specialization for value types. Uses CompareTo method.

Template Parameters
containerTSTL-styled container template type with two template arguments: element type and allocator type.
TElement type.
AllocatorAllocator type.
Parameters
containerContainer to search in.
indexSearch range beginning index.
countSearch range length.
valueValue to look for.
Returns
If found, index of the next element; otherwise, complements of index at which the search stopped.

◆ _net_binnary_search() [4/4]

template<template< typename, typename > class containterT, class T , class Allocator >
std::enable_if<std::is_scalar<T>::value, int>::type System::Collections::Generic::_net_binnary_search ( const containterT< T, Allocator > &  container,
int  index,
int  count,
value 
)

Implements binary search in random access container. Specialization for scalar types. Compares elements using greater and less operators.

Template Parameters
containerTSTL-styled container template type with two template arguments: element type and allocator type.
TElement type.
AllocatorAllocator type.
Parameters
containerContainer to search in.
indexSearch range beginning index.
countSearch range length.
valueValue to look for.
Returns
If found, index of the next element; otherwise, complements of index at which the search stopped.

◆ operator!=()

template<typename TKey , typename TValue >
bool System::Collections::Generic::operator!= ( const KeyValuePair< TKey, TValue > &  left,
const KeyValuePair< TKey, TValue > &  right 
)

Compares two key-value pairs using inverse 'equals' semantics.

Template Parameters
TKeyKey type.
TValueValue type.
Parameters
leftLHS operand.
rightRHS operand.
Returns
True if both keys and values don't match, false otherwise.

◆ operator==()

template<typename TKey , typename TValue >
bool System::Collections::Generic::operator== ( const KeyValuePair< TKey, TValue > &  left,
const KeyValuePair< TKey, TValue > &  right 
)

Compares two key-value pairs using 'equals' semantics. Uses operator == or EqualsTo method for both keys and values, whichever is defined.

Template Parameters
TKeyKey type.
TValueValue type.
Parameters
leftLHS operand.
rightRHS operand.
Returns
True if both keys and values match, false otherwise.