CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
linkedlist.h
1
2#pragma once
3
4#include <system/object.h>
5#include <system/string.h>
6#include <system/type_info.h>
7#include <system/shared_ptr.h>
8#include <system/exceptions.h>
9#include <system/collections/ienumerator.h>
10#include <system/collections/ienumerable.h>
11#include <system/collections/icollection.h>
12#include <system/collections/invalidatable.h>
13#include <system/array.h>
14
15#include <system/diagnostics/debug.h>
16#include <list>
17#include <unordered_map>
18
19#include <type_traits>
20
21namespace System { namespace Collections { namespace Generic {
22
24template <typename T>
25class LinkedList;
26
33template <typename T>
34class ASPOSECPP_SHARED_CLASS LinkedListNode final : public Object
35{
37 RTTI_INFO_TEMPLATE_CLASS(LinkedListNode<T>, System::BaseTypesInfo<System::Object>)
39 friend class LinkedList<T>;
41 typedef typename LinkedList<T>::iterator iterator;
42
46 LinkedListNode(const SharedPtr<LinkedList<T>>& list, const iterator& it) : m_value(*it)
47 {
48 Bind(list, it);
49 }
50 MEMBER_FUNCTION_MAKE_OBJECT(LinkedListNode, CODEPORTING_ARGS(const SharedPtr<LinkedList<T>>& list, const iterator& it), CODEPORTING_ARGS(list, it));
51
55 void Bind(const SharedPtr<LinkedList<T>>& list, const iterator& it)
56 {
57 list->m_ptr_node_map[&*it] = this;
58 m_list = list;
59 m_it = it;
60 }
61
63 void Unbind()
64 {
65 if (m_list != nullptr)
66 {
67 m_list->m_ptr_node_map.erase(&*m_it);
68 m_list = nullptr;
69 m_it = iterator();
70 }
71 }
72
74 void UnbindNode()
75 {
76 if (m_list != nullptr)
77 {
78 m_list = nullptr;
79 m_it = iterator();
80 }
81 }
82
84 iterator CopyIterator() const
85 {
86 return m_it;
87 }
88
89public:
92 LinkedListNode(const T &value) : m_value(value)
93 {}
94
98 {
99 return m_list;
100 }
101
105 {
106 if (m_list != nullptr)
107 {
108 auto next_it = ++CopyIterator();
109 if (next_it == m_list->m_data.end())
110 return nullptr;
111
112 return m_list->MakeSharedLinkedListNode(next_it);
113 }
114 else
115 return nullptr;
116 }
117
121 {
122 if (m_list != nullptr && m_it != m_list->m_data.begin())
123 return m_list->MakeSharedLinkedListNode(--CopyIterator());
124 else
125 return nullptr;
126 }
127
130 T get_Value() const
131 {
132 return m_value;
133 }
134
137 void set_Value(const T &value)
138 {
139 m_value = value;
140 if (m_list != nullptr)
141 {
142 *m_it = value;
143 }
144 }
145
146protected:
149 {
150 if (m_list != nullptr)
151 {
152 m_list->m_ptr_node_map.erase(&*m_it);
153 }
154 }
155
156#ifdef ASPOSE_GET_SHARED_MEMBERS
159 void GetSharedMembers(System::Object::shared_members_type& result) const override
160 {
161 System::Object::GetSharedMembers(result);
162
163 result.Add("System::Collections::Generic::LinkedListNode::m_list", this->m_list);
164 }
165#endif
166
167
168#ifdef __DBG_FOR_EACH_MEMBER
169 public:
172 void DBG_for_each_member(DBG::for_each_member_visitor &visitor) const override
173 {
174 Object::DBG_for_each_member(visitor);
175
176 visitor.add_self(this);
177 visitor.add_member(this, m_list, "m_list");
178 }
179
182 const char* DBG_class_name() const override { return "LinkedListNode<T>"; }
183#endif
184
185private:
187 T m_value;
189 SharedPtr<LinkedList<T>> m_list;
191 iterator m_it;
192};
193
231template <typename T>
232class ASPOSECPP_SHARED_CLASS LinkedList : virtual public Object, public ICollection<T>, private Invalidatable
233{
235 typedef BaseTypesInfo<Object, ICollection<T>> ThisTypeBaseTypesInfo;
237 RTTI_INFO_TEMPLATE_CLASS(LinkedList<T>, ThisTypeBaseTypesInfo);
239 friend class LinkedListNode<T>;
240
242
243 ASPOSE_COLLECTION_POINTER_MODE_CONTROL(T)
244
245public:
247 typedef std::list<T, typename pointer_mode_t::allocator_type> list_t;
248
250 typedef typename list_t::iterator iterator;
252 typedef typename list_t::const_iterator const_iterator;
254 typedef typename list_t::reverse_iterator reverse_iterator;
256 typedef typename list_t::const_reverse_iterator const_reverse_iterator;
257
259 class Enumerator : virtual public Object, public IEnumerator<T>
260 {
262 typedef BaseTypesInfo<Object, IEnumerator<T>> ThisTypeBaseTypesInfo;
264 RTTI_INFO_TEMPLATE_CLASS(LinkedList<T>, ThisTypeBaseTypesInfo);
266 typedef typename LinkedList<T>::iterator iterator;
267
269 iterator m_current;
273 bool m_was_first_move;
275 bool m_was_not_reached_end;
277 InvalidatableTracker m_tracker;
278
279 public:
282 Enumerator(const SharedPtr<LinkedList<T>>& list) : m_list(list)
283 , m_was_first_move(false)
284 , m_was_not_reached_end(true), m_tracker(list.get())
285 {}
286
290 {
291 return *m_current;
292 }
293
296 bool MoveNext() override
297 {
298 if (!m_tracker.CheckValidity())
299 throw InvalidOperationException(u"Collection was modified after the enumerator was instantiated.");
300 else if (!m_was_first_move)
301 {
302 m_was_first_move = true;
303
304 if ((m_current = m_list->begin()) != m_list->end())
305 return true;
306 else
307 {
308 m_was_not_reached_end = false;
309 return false;
310 }
311 }
312 else if (m_was_not_reached_end)
313 {
314 if (++m_current != m_list->end())
315 return true;
316 else
317 {
318 m_was_not_reached_end = false;
319 return false;
320 }
321 }
322 else
323 return false;
324 }
325
326 protected:
328 ~Enumerator() override
329 {}
330
331#ifdef ASPOSE_GET_SHARED_MEMBERS
334 void GetSharedMembers(System::Object::shared_members_type& result) const override
335 {
336 System::Object::GetSharedMembers(result);
337
338 result.Add("System::Collections::Generic::LinkedList::Enumerator::m_list", this->m_list);
339 }
340#endif
341
342#ifdef __DBG_FOR_EACH_MEMBER
343 public:
346 void DBG_for_each_member(DBG::for_each_member_visitor& visitor) const override
347 {
348 Object::DBG_for_each_member(visitor);
349
350 visitor.add_self(this);
351 visitor.add_member(this, m_list, "m_list");
352 }
353
356 const char* DBG_class_name() const override { return "LinkedList::Enumerator<T>"; }
357#endif
358 };
359
361 LinkedList() : ASPOSE_COLLECTION_INIT_ALLOCATOR(){}
362
365 LinkedList(const SharedPtr<IEnumerable<T>>& collection) : ASPOSE_COLLECTION_INIT_ALLOCATOR()
366 {
367 if (collection == nullptr)
368 throw ArgumentNullException(u"Value cannot be null. Parameter name: collection");
369
370 for (auto enumerator = collection->GetEnumerator(); enumerator->MoveNext();)
371 {
372 m_data.emplace_back(enumerator->get_Current());
373 }
374 }
375
379 {
380 if (m_data.empty())
381 return nullptr;
382 else
383 return MakeSharedLinkedListNode(m_data.begin());
384 }
385
389 {
390 if (m_data.empty())
391 return nullptr;
392 else
393 return MakeSharedLinkedListNode(--m_data.end());
394 }
395
398 int get_Count() const override
399 {
400 return ASPOSECPP_CHECKED_CAST(int, m_data.size());
401 }
402
408 {
409 if (node == nullptr)
410 throw ArgumentNullException(u"Value cannot be null. Parameter name: node");
411
412 if (node->get_List().get() != this)
413 throw InvalidOperationException(u"The LinkedList node does not belong to current LinkedList.");
414
415 Invalidate();
416
417 auto it = m_data.emplace(++node->CopyIterator(), element);
419 }
420
425 {
426 if (node == nullptr)
427 throw ArgumentNullException(u"Value cannot be null. Parameter name: node");
428
429 if (newNode == nullptr)
430 throw ArgumentNullException(u"Value cannot be null. Parameter name: newNode");
431
432 if (node->m_list.get() != this)
433 throw InvalidOperationException(u"The LinkedList node does not belong to current LinkedList.");
434
435 if (newNode->m_list != nullptr)
436 throw InvalidOperationException(u"The LinkedList node already belongs to a LinkedList.");
437
438 Invalidate();
439
440 auto it = m_data.emplace(++node->CopyIterator(), newNode->m_value);
441 newNode->Bind(MakeSharedPtr(this), it);
442 }
443
449 {
450 if (node == nullptr)
451 throw ArgumentNullException(u"Value cannot be null. Parameter name: node");
452
453 if (node->get_List().get() != this)
454 throw InvalidOperationException(u"The LinkedList node does not belong to current LinkedList.");
455
456 Invalidate();
457
458 auto it = m_data.emplace(node->m_it, element);
460 }
461
466 {
467 if (node == nullptr)
468 throw ArgumentNullException(u"Value cannot be null. Parameter name: node");
469
470 if (newNode == nullptr)
471 throw ArgumentNullException(u"Value cannot be null. Parameter name: newNode");
472
473 if (node->m_list.get() != this)
474 throw InvalidOperationException(u"The LinkedList node does not belong to current LinkedList.");
475
476 if (newNode->m_list != nullptr)
477 throw InvalidOperationException(u"The LinkedList node already belongs to a LinkedList.");
478
479 Invalidate();
480
481 auto it = m_data.emplace(node->m_it, newNode->m_value);
482 newNode->Bind(MakeSharedPtr(this), it);
483 }
484
489 {
490 Invalidate();
491
492 auto it = m_data.emplace(m_data.begin(), element);
494 }
495
499 {
500 if (newNode == nullptr)
501 throw ArgumentNullException(u"Value cannot be null. Parameter name: newNode");
502
503 if (newNode->m_list != nullptr)
504 throw InvalidOperationException(u"The LinkedList node already belongs to a LinkedList.");
505
506 Invalidate();
507
508 auto it = m_data.emplace(m_data.begin(), newNode->m_value);
509 newNode->Bind(MakeSharedPtr(this), it);
510 }
511
516 {
517 Invalidate();
518
519 auto it = m_data.emplace(m_data.end(), element);
521 }
522
525 void AddLast(const SharedPtr<LinkedListNode<T>>& newNode)
526 {
527 if (newNode == nullptr)
528 throw ArgumentNullException(u"Value cannot be null. Parameter name: newNode");
529
530 if (newNode->m_list != nullptr)
531 throw InvalidOperationException(u"The LinkedList node already belongs to a LinkedList.");
532
533 Invalidate();
534
535 auto it = m_data.emplace(m_data.end(), newNode->m_value);
536 newNode->Bind(MakeSharedPtr(this), it);
537 }
538
541 void Add(const T& element) override
542 {
543 AddLast(element);
544 }
545
547 void Clear() override
548 {
549 Invalidate();
550
551 std::for_each(m_ptr_node_map.begin(), m_ptr_node_map.end(),
552 [](const std::pair<const T*, LinkedListNode<T>*>& it_node_pair) {
553 it_node_pair.second->UnbindNode();
554 });
555 m_ptr_node_map.clear();
556 m_data.clear();
557 }
558
562 bool Contains(const T& element) const override
563 {
564 return std::find(m_data.begin(), m_data.end(), element) != m_data.end();
565 }
566
570 void CopyTo(ArrayPtr<T> array, int index) override
571 {
572 if (array == nullptr)
573 throw ArgumentNullException(u"Value cannot be null. Parameter name: array");
574
575 if (index < 0)
576 throw ArgumentOutOfRangeException(u"Index is out of range. Parameter name: index");
577
578 if (array->get_Count() - index < get_Count())
579 throw ArgumentException(u"Insufficient space in the target location to copy the information.");
580
581 std::copy(m_data.begin(), m_data.end(), array.begin() + index);
582 }
583
587 SharedPtr<LinkedListNode<T>> Find(const T& element) const
588 {
589 auto it = std::find(m_data.begin(), m_data.end(), element);
590 if (it == m_data.end())
591 return nullptr;
592 else
593 return MakeSharedLinkedListNode(it);
594 }
595
599 SharedPtr<LinkedListNode<T>> FindLast(const T& element) const
600 {
601 auto rit = std::find(m_data.rbegin(), m_data.rend(), element);
602 if (rit == m_data.rend())
603 return nullptr;
604 else
605 return MakeSharedLinkedListNode(--rit.base());
606 }
607
611 {
612 return MakeObject<Enumerator>(MakeSharedPtr(this));
613 }
614
618 bool Remove(const T& element) override
619 {
620 auto it = std::find(m_data.begin(), m_data.end(), element);
621 if (it == m_data.end())
622 return false;
623 else
624 {
625 Invalidate();
626
627 auto ptr_node_it = m_ptr_node_map.find(&*it);
628 if (ptr_node_it != m_ptr_node_map.end())
629 {
630 ptr_node_it->second->Unbind();
631 }
632
633 m_data.erase(it);
634 return true;
635 }
636 }
637
641 {
642 if (node == nullptr)
643 throw ArgumentNullException(u"Value cannot be null. Parameter name: node");
644
645 if (node->m_list.get() != this)
646 throw InvalidOperationException(u"The LinkedList node does not belong to current LinkedList.");
647
648 Invalidate();
649
650 auto it = node->m_it;
651 node->Unbind();
652 m_data.erase(it);
653 }
654
658 {
659 if (m_data.empty())
660 throw InvalidOperationException(u"The LinkedList is empty.");
661
662 Invalidate();
663
664 auto ptr_node_it = m_ptr_node_map.find(&*m_data.begin());
665 if (ptr_node_it != m_ptr_node_map.end())
666 {
667 ptr_node_it->second->Unbind();
668 }
669
670 m_data.pop_front();
671 }
672
676 {
677 if (m_data.empty())
678 throw InvalidOperationException(u"The LinkedList is empty.");
679
680 Invalidate();
681
682 auto ptr_node_it = m_ptr_node_map.find(&*--m_data.end());
683 if (ptr_node_it != m_ptr_node_map.end())
684 {
685 ptr_node_it->second->Unbind();
686 }
687
688 m_data.pop_back();
689 }
690
693 iterator begin() noexcept
694 {
695 return m_data.begin();
696 }
699 iterator end() noexcept
700 {
701 return m_data.end();
702 }
703
706 const_iterator begin() const noexcept
707 {
708 return m_data.begin();
709 }
713 const_iterator end() const noexcept
714 {
715 return m_data.end();
716 }
717
720 const_iterator cbegin() const noexcept
721 {
722 return m_data.cbegin();
723 }
727 const_iterator cend() const noexcept
728 {
729 return m_data.cend();
730 }
731
735 {
736 return m_data.rbegin();
737 }
742 {
743 return m_data.rend();
744 }
745
749 {
750 return m_data.rbegin();
751 }
756 {
757 return m_data.rend();
758 }
759
763 {
764 return m_data.crbegin();
765 }
770 {
771 return m_data.crend();
772 }
773
775 System::Details::VirtualizedIteratorBase<T>* virtualizeBeginIterator() override
776 {
777 return new System::Details::NativeIteratorWrapper<T, iterator>(begin(), end());
778 }
780 System::Details::VirtualizedIteratorBase<T>* virtualizeEndIterator() override
781 {
782 return new System::Details::NativeIteratorWrapper<T, iterator>(end(), end());
783 }
785 System::Details::VirtualizedIteratorBase<T>* virtualizeBeginConstIterator() const override
786 {
787 return new System::Details::NativeConstIteratorWrapper<T, const_iterator>(begin(), end());
788 }
790 System::Details::VirtualizedIteratorBase<T>* virtualizeEndConstIterator() const override
791 {
792 return new System::Details::NativeConstIteratorWrapper<T, const_iterator>(end(), end());
793 }
794
795#ifdef __DBG_FOR_EACH_MEMBER
798 void DBG_for_each_member(DBG::for_each_member_visitor& visitor) const override
799 {
800 Object::DBG_for_each_member(visitor);
801
802 visitor.add_self(this);
803 visitor.add_member(this, m_data, "m_data");
804 }
805
808 const char* DBG_class_name() const override { return "LinkedList<T>"; }
809#endif
810
811protected:
813 ~LinkedList() override
814 {}
815
816#ifdef ASPOSE_GET_SHARED_MEMBERS
817 DEFINE_GET_SHARED_MEMBERS(m_data)
818#endif
819
820private:
823 SharedPtr<LinkedListNode<T>> MakeSharedLinkedListNode(iterator it) const
824 {
825 auto ptr_node_it = m_ptr_node_map.find(&*it);
826 if (ptr_node_it != m_ptr_node_map.end())
827 return MakeSharedPtr(ptr_node_it->second);
828 else
830 }
831
833 mutable list_t m_data;
836 std::unordered_map<const T*, LinkedListNode<T>*> m_ptr_node_map;
837};
838
839}}} // namespace System::Collections::Generic
Interface of collection of elements. Objects of this class should only be allocated using System::Mak...
Definition: icollection.h:20
Interface of object providing enumerator on contained elements.
Definition: ienumerable.h:25
System::Details::VirtualizedConstIterator< T > const_iterator
Const iterator type.
Definition: ienumerable.h:216
System::Details::VirtualizedIterator< T > iterator
Iterator type.
Definition: ienumerable.h:214
Interface of enumerator which can be used to iterate through some elements. Objects of this class sho...
Definition: ienumerator.h:63
Enumerator to iterate through linked list.
Definition: linkedlist.h:260
MakeConstRef_t< T > get_Current() const override
Gets current element.
Definition: linkedlist.h:289
Enumerator(const SharedPtr< LinkedList< T > > &list)
Creates enumerator.
Definition: linkedlist.h:282
~Enumerator() override
Destructor.
Definition: linkedlist.h:328
bool MoveNext() override
Points enumerator to the next element (if any).
Definition: linkedlist.h:296
LinkedList forward declaration.
Definition: linkedlist.h:233
~LinkedList() override
Destructor.
Definition: linkedlist.h:813
void CopyTo(ArrayPtr< T > array, int index) override
Copies container data into existing array elements.
Definition: linkedlist.h:570
reverse_iterator rbegin() noexcept
Gets a reverse iterator to the last element of collection (first in reverse).
Definition: linkedlist.h:734
SharedPtr< LinkedListNode< T > > get_Last() const
Gets pointer to the last element in the list.
Definition: linkedlist.h:388
void RemoveLast()
Removes last node from list.
Definition: linkedlist.h:675
LinkedList()
Creates empty LinkedList.
Definition: linkedlist.h:361
System::Details::VirtualizedIteratorBase< T > * virtualizeBeginConstIterator() const override
Gets the implementation of begin const iterator for the current container.
Definition: linkedlist.h:785
SharedPtr< LinkedListNode< T > > FindLast(const T &element) const
Performs reverse direction find of an element in the list.
Definition: linkedlist.h:599
void Add(const T &element) override
Adds element to the end of the list.
Definition: linkedlist.h:541
void AddLast(const SharedPtr< LinkedListNode< T > > &newNode)
Adds newNode to the end of the list.
Definition: linkedlist.h:525
const_reverse_iterator crend() const noexcept
Gets a reverse iterator for a non-existent const-qualified element before the start of the collection...
Definition: linkedlist.h:769
LinkedList(const SharedPtr< IEnumerable< T > > &collection)
Copy constructor.
Definition: linkedlist.h:365
SharedPtr< LinkedListNode< T > > AddFirst(const T &element)
Adds element to the beginning of the list.
Definition: linkedlist.h:488
list_t::iterator iterator
Iterator type.
Definition: linkedlist.h:250
SharedPtr< IEnumerator< T > > GetEnumerator() override
Gets enumerator to iterate through current LinkedList.
Definition: linkedlist.h:610
System::Details::VirtualizedIteratorBase< T > * virtualizeBeginIterator() override
Gets the implementation of begin iterator for the current container.
Definition: linkedlist.h:775
const_reverse_iterator crbegin() const noexcept
Gets a reverse iterator to the last const-qualified element of collection (first in reverse).
Definition: linkedlist.h:762
int get_Count() const override
Gets number of elements in list.
Definition: linkedlist.h:398
reverse_iterator rend() noexcept
Gets a reverse iterator for a non-existent element before the start of the collection.
Definition: linkedlist.h:741
const_reverse_iterator rend() const noexcept
Gets a reverse iterator for a non-existent element before the start of the const-qualified collection...
Definition: linkedlist.h:755
const_iterator begin() const noexcept
Gets iterator to the first element of the const-qualified collection.
Definition: linkedlist.h:706
const_iterator cend() const noexcept
Gets iterator for a non-existent const-qualified element behind the end of the collection.
Definition: linkedlist.h:727
list_t::const_iterator const_iterator
Const iterator type.
Definition: linkedlist.h:252
iterator begin() noexcept
Gets iterator to the first element of collection.
Definition: linkedlist.h:693
const_reverse_iterator rbegin() const noexcept
Gets a reverse iterator to the last element of the const-qualified collection (first in reverse).
Definition: linkedlist.h:748
list_t::reverse_iterator reverse_iterator
Reverse iterator type.
Definition: linkedlist.h:254
SharedPtr< LinkedListNode< T > > get_First() const
Gets pointer to the first element in the list.
Definition: linkedlist.h:378
const_iterator cbegin() const noexcept
Gets iterator to the first const-qualified element of collection.
Definition: linkedlist.h:720
void AddFirst(const SharedPtr< LinkedListNode< T > > &newNode)
Adds newNode to the beginning of the list.
Definition: linkedlist.h:498
bool Contains(const T &element) const override
Checks if element is present in list.
Definition: linkedlist.h:562
std::list< T, typename pointer_mode_t::allocator_type > list_t
Underlying data type.
Definition: linkedlist.h:247
SharedPtr< LinkedListNode< T > > Find(const T &element) const
Performs forward direction find of an element in the list.
Definition: linkedlist.h:587
SharedPtr< LinkedListNode< T > > AddLast(const T &element)
Adds element to the end of the list.
Definition: linkedlist.h:515
const_iterator end() const noexcept
Gets iterator for a non-existent element behind the end of the const-qualified collection.
Definition: linkedlist.h:713
void AddAfter(const SharedPtr< LinkedListNode< T > > &node, const SharedPtr< LinkedListNode< T > > &newNode)
Adds newNode after node of the list.
Definition: linkedlist.h:424
void RemoveFirst()
Removes first node from list.
Definition: linkedlist.h:657
void Remove(const SharedPtr< LinkedListNode< T > > &node)
Removes node from list.
Definition: linkedlist.h:640
System::Details::VirtualizedIteratorBase< T > * virtualizeEndConstIterator() const override
Gets the implementation of end const iterator for the current container.
Definition: linkedlist.h:790
iterator end() noexcept
Gets iterator for a non-existent element behind the end of the collection.
Definition: linkedlist.h:699
SharedPtr< LinkedListNode< T > > AddBefore(const SharedPtr< LinkedListNode< T > > &node, const T &element)
Adds element before node of the list.
Definition: linkedlist.h:448
System::Details::VirtualizedIteratorBase< T > * virtualizeEndIterator() override
Gets the implementation of end iterator for the current container.
Definition: linkedlist.h:780
void Clear() override
Deletes all elements in list.
Definition: linkedlist.h:547
void AddBefore(const SharedPtr< LinkedListNode< T > > &node, const SharedPtr< LinkedListNode< T > > &newNode)
Adds newNode before node of the list.
Definition: linkedlist.h:465
list_t::const_reverse_iterator const_reverse_iterator
Const reverse iterator type.
Definition: linkedlist.h:256
SharedPtr< LinkedListNode< T > > AddAfter(const SharedPtr< LinkedListNode< T > > &node, const T &element)
Adds element after node of the list.
Definition: linkedlist.h:407
bool Remove(const T &element) override
Removes first occurance of the specified element from list.
Definition: linkedlist.h:618
Node of linked list. Implements a wrapper over an iterator of std::list that is wrapped in linked lis...
Definition: linkedlist.h:35
~LinkedListNode() override
Destructor.
Definition: linkedlist.h:148
LinkedListNode(const T &value)
Constructor.
Definition: linkedlist.h:92
T get_Value() const
Gets stored value.
Definition: linkedlist.h:130
SharedPtr< LinkedListNode< T > > get_Next() const
Gets next node.
Definition: linkedlist.h:104
void set_Value(const T &value)
Sets stored value.
Definition: linkedlist.h:137
SharedPtr< LinkedListNode< T > > get_Previous() const
Gets previous node.
Definition: linkedlist.h:120
SharedPtr< LinkedList< T > > get_List() const
Gets containing list.
Definition: linkedlist.h:97
Class that makes it possible to track the state of its descendants through InvalidatableTracker objec...
Definition: invalidatable.h:12
void Invalidate()
Changes the current state, invalidating all previously created trackers.
Class that implements trackers of Invalidatable objects.
Definition: invalidatable.h:32
bool CheckValidity() const
Checks if the state of the tracked object has changed.
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
auto end() -> decltype(std::declval< Q >().end())
Accessor for end() method of an underling collection. Only compiles if SmartPtr_ is specialization ty...
Definition: smart_ptr.h:838
auto begin() -> decltype(std::declval< Q >().begin())
Accessor for begin() method of an underling collection. Only compiles if SmartPtr_ is specialization ...
Definition: smart_ptr.h:830
Definition: db_command.h:9
SmartPtr< X > MakeSharedPtr(X *p)
Converts raw pointer to smart pointer.
Definition: smart_ptr.h:1650
typename MakeConstRef< T >::type MakeConstRef_t
Helper type for MakeConstRef modifier.
Definition: make_const_ref.h:20