28 FList() : head(0), tail(0), count(0) { }
31 inline void Add(
const T& item)
35 this->tail->next =
new FNode<T>(item, this->tail);
36 this->tail = this->tail->next;
40 this->head = this->tail =
new FNode<T>(item);
46 inline ULLong
Count()
const {
return this->count; }
48 inline T operator [](ULLong position)
const
50 if (position >= this->count)
return T();
54 Boolean forward = position <= (this->count / 2) ?
true :
false;
55 FNode<T>* current = forward ? this->head : this->tail;
56 ULLong index = forward ? 0 : (this->count - 1);
60 while (index < position)
62 current = current->next;
68 while (index > position)
70 current = current->last;
83 if (position >= this->count)
return;
87 if (position == 0 && !this->head->next)
92 else if (position == 0)
95 this->head = current->next;
102 Boolean forward = position <= (this->count / 2) ?
true :
false;
103 FNode<T>* current = forward ? this->head : this->tail;
104 ULLong index = forward ? 0 : (this->count - 1);
108 while (index < position)
110 current = current->next;
116 while (index > position)
118 current = current->last;
126 if (next) next->last = last;
127 if (last) last->next = next;
146 current = current->next;
156 return typeid(
FList);
161 return typeid(
FList).name();
FList()
Constructor list object.
Definition: FList.h:28
FString GetName() const override
< Returns the name of object
Definition: FList.h:159
virtual ~FList()
Destroy list object.
Definition: FList.h:29
ULLong Count() const
Count of items in list.
Definition: FList.h:46
void Remove(ULLong position)
Definition: FList.h:81
void Add(const T &item)
Definition: FList.h:31
const type_info & GetType() override
< Returns the type info over object
Definition: FList.h:154