Represents a heterogeneous collection of objects that can be individually accessed by index.
More...
template<class T, class TValueInterface, class TValuePtr>
class ListObjectPtr< T, TValueInterface, TValuePtr >
Represents a heterogeneous collection of objects that can be individually accessed by index.
|
| TValuePtr | getItemAt (size_t index) const |
| | Gets the element at a specific position. More...
|
| |
| SizeT | getCount () const |
| | Gets the number of elements contained in the list. More...
|
| |
| SizeT | empty () const |
| | Returns true if there are no elements in the list. More...
|
| |
| void | setItemAt (size_t index, const TValuePtr &obj) |
| | Sets the element at a specific position. More...
|
| |
| void | pushBack (const TValuePtr &obj) |
| | Inserts the element at the end of the list. More...
|
| |
| void | pushBack (TValuePtr &&obj) |
| | Inserts the element at the end of the list. More...
|
| |
| void | pushFront (const TValuePtr &obj) |
| | Inserts the element at the start of the list. More...
|
| |
| void | pushFront (TValuePtr &&obj) |
| | Inserts the element at the start of the list. More...
|
| |
| TValuePtr | popBack () |
| | Gets the element from the end of the list. More...
|
| |
| TValuePtr | popFront () |
| | Gets the element from the start of the list. More...
|
| |
| void | insertAt (size_t index, const TValuePtr &obj) |
| | Inserts the element at a specific position. More...
|
| |
| TValuePtr | removeAt (size_t index) |
| | Removes the element at a specific position. More...
|
| |
| void | deleteAt (size_t index) |
| | Deletes the element at a specific position. More...
|
| |
|
void | clear () |
| | Removes all elements from the list.
|
| |
|
IteratorType | begin () const |
| | Creates start iterator for the list.
|
| |
|
IteratorType | end () const |
| | Creates end iterator for the list.
|
| |
| IntfID | getElementInterfaceId () const |
| | Returns the interface id of the expected list element type. More...
|
| |
|
std::vector< TValuePtr > | toVector () const |
| | Returns a copy of list as std::vector.
|
| |
|
| ObjectPtr () |
| | Creates a smart pointer with no wrapped interface.
|
| |
|
| ObjectPtr (std::nullptr_t) |
| | Creates a smart pointer with no wrapped interface.
|
| |
| | ObjectPtr (const ObjectPtr< T > &objPtr) |
| | Creates a smart pointer from another smart pointer. More...
|
| |
| | ObjectPtr (ObjectPtr< T > &&objPtr) noexcept |
| | Creates a smart pointer from another smart pointer with move semantics. More...
|
| |
| template<class U > |
| | ObjectPtr (const ObjectPtr< U > &objPtr) |
| | Creates a smart pointer from another smart pointer of a different interface type. More...
|
| |
| template<class U > |
| | ObjectPtr (ObjectPtr< U > &&objPtr) |
| | Creates a smart pointer from another smart pointer of a different interface type with move semantics. More...
|
| |
| | ObjectPtr (T *&obj) |
| | Creates a smart pointer from an interface pointer. More...
|
| |
| | ObjectPtr (T *&&obj) |
| | Creates a smart pointer from an interface pointer with move semantics. More...
|
| |
| | ObjectPtr (IWeakRef *obj) |
| | Creates a smart pointer from a weak reference interface pointer. More...
|
| |
| | ObjectPtr (const wchar_t *value) |
| | Creates a string object smart pointer from UTF16 null terminated sequence. More...
|
| |
| | ObjectPtr (ConstCharPtr value) |
| | Creates a string object smart pointer from UTF8 null terminated sequence. More...
|
| |
| template<typename U , std::enable_if_t< is_ct_conv< U >::value &&!std::is_enum_v< U >, int > = 0> |
| | ObjectPtr (const U &value) |
| | Creates a smart pointer wrapper from value type. More...
|
| |
| virtual | ~ObjectPtr () |
| | Destructor. More...
|
| |
| bool | equals (ObjectPtr< IBaseObject > other) const |
| | Compares object to another object for equality. More...
|
| |
| T * | detach () |
| | Disassociates this smart pointer object from the interface that it represents. More...
|
| |
| void | dispose () const |
| | Disposes all references held by the object. More...
|
| |
| void | release () |
| | Resets the wrapped interface to nullptr. More...
|
| |
| T * | addRefAndReturn () const |
| | Increments the reference count and returns the interface. More...
|
| |
| | operator T* () const |
| | Casts the pointer to the wrapped interface. More...
|
| |
|
bool | assigned () const |
| | Checks if the smart pointer is not empty.
|
| |
| T * | getObject () const |
| | Gets the pointer to the wrapped interface. More...
|
| |
| T ** | addressOf () |
| | Gets the address of the pointer to the wrapped interface. More...
|
| |
| T ** | operator& () |
| | Gets the address of the pointer to the wrapped interface. More...
|
| |
| template<class U > |
| U * | as (bool borrow=false) const |
| | Casts the wrapped interface to another interface. More...
|
| |
| template<class U > |
| U * | asOrNull (bool borrow=false) const |
| | Casts the wrapped interface to another interface. More...
|
| |
| template<class U , class Ptr = typename InterfaceToSmartPtr<U>::SmartPtr> |
| Ptr | asPtr (bool borrow=false) const |
| | Casts the wrapped interface to another interface and wraps in a smart pointer. More...
|
| |
| template<class U , class Ptr = typename InterfaceToSmartPtr<U>::SmartPtr> |
| Ptr | asPtrOrNull (bool borrow=false) const |
| | Casts the wrapped interface to another interface and wraps in a smart pointer. More...
|
| |
| template<class U > |
| bool | supportsInterface () const |
| | Checks if the wrapped interface supports another interface. More...
|
| |
| bool | supportsInterface (const IntfID &id) const |
| | Checks if the wrapped interface supports another interface using the interface ID. More...
|
| |
| CoreType | getCoreType () const |
| | Gets the object's CoreType. More...
|
| |
| ObjectPtr< IBaseObject > | convertTo (CoreType ct) const |
| | Converts the object to the specified CoreType. More...
|
| |
| SizeT | getHashCode () const |
| | Returns hash code of the object. More...
|
| |
| ObjectPtr< IString > | toString () const |
| | Converts the object to the string object. More...
|
| |
| void | freeze () const |
| | Freezes the object. More...
|
| |
| Bool | isFrozen () const |
| | Checks if the object is frozen. More...
|
| |
| void | dispatch (const ObjectPtr< IBaseObject > ¶ms) const |
| | Calls the stored callback. More...
|
| |
| void | dispatch () const |
| | Calls the stored callback without any parameters. More...
|
| |
| void | execute () const |
| | Calls the stored callback without any parameters. More...
|
| |
| template<typename... Params> |
| void | execute (Params... params) const |
| | Calls the stored callback. More...
|
| |
| template<typename... Params> |
| ObjectPtr< IBaseObject > | call (Params... params) const |
| | Calls the stored callback and returns the result. More...
|
| |
| bool | isBorrowed () const |
| | Checks if the reference is borrowed. More...
|
| |