the_Foundation 1.0
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
objectlist.h File Reference
#include "list.h"
#include "object.h"

Data Structures

struct  iObjectListClass
 
struct  iObjectList
 
struct  iObjectListNode
 
struct  iObjectListReverseIterator
 
struct  iObjectListReverseConstIterator
 

Macros

#define next_ObjectListNode(d)   ((iObjectListNode *) ((d) ? (d)->node.next : NULL))
 
#define prev_ObjectListNode(d)   ((iObjectListNode *) ((d) ? (d)->node.prev : NULL))
 
#define object_ObjectListNode(d)   ((iAnyObject *) ((const iObjectListNode *) (d))->object)
 
#define list_ObjectList(d)   (&(d)->list)
 
#define begin_ObjectList(d)   ((iObjectListNode *) (d)->list.root.next)
 
#define end_ObjectList(d)   ((iObjectListNode *) &(d)->list.root)
 
#define constBegin_ObjectList(d)   ((const iObjectListNode *) (d)->list.root.next)
 
#define constEnd_ObjectList(d)   ((const iObjectListNode *) &(d)->list.root)
 

Functions

iObjectList * new_ObjectList (void)
 
void init_ObjectList (iObjectList *d)
 
void deinit_ObjectList (iObjectList *d)
 
iObjectList * copy_ObjectList (const iObjectList *)
 
iObject * front_ObjectList (const iObjectList *)
 
iObject * back_ObjectList (const iObjectList *)
 
void clear_ObjectList (iObjectList *)
 
iAnyObject * pushBack_ObjectList (iObjectList *, iAnyObject *object)
 
iAnyObject * pushFront_ObjectList (iObjectList *, iAnyObject *object)
 
iAnyObject * insertAfter_ObjectList (iObjectList *, iObjectListNode *after, iObject *object)
 
iAnyObject * insertBefore_ObjectList (iObjectList *, iObjectListNode *before, iObject *object)
 
void removeNode_ObjectList (iObjectList *, iObjectListNode *node)
 
void popFront_ObjectList (iObjectList *)
 
void popBack_ObjectList (iObjectList *)
 
Iterators
void init_ObjectListIterator (iObjectListIterator *, iObjectList *)
 
void next_ObjectListIterator (iObjectListIterator *)
 
void init_ObjectListReverseIterator (iObjectListReverseIterator *, iObjectList *)
 
void next_ObjectListReverseIterator (iObjectListReverseIterator *)
 
void remove_ObjectListIterator (iObjectListIterator *)
 
void init_ObjectListConstIterator (iObjectListConstIterator *, const iObjectList *)
 
void next_ObjectListConstIterator (iObjectListConstIterator *)
 
void init_ObjectListReverseConstIterator (iObjectListReverseConstIterator *, const iObjectList *)
 
void next_ObjectListReverseConstIterator (iObjectListReverseConstIterator *)
 

Variables

iObjectListClass Class_ObjectList
 

Detailed Description

List of objects.

ObjectList is itself an Object.

ObjectList owns its nodes, so deleting the list will delete all the nodes and release references to the corresponding objects.

Authors
Copyright (c) 2017 Jaakko Keränen jaakk.nosp@m.o.ke.nosp@m.ranen.nosp@m.@iki.nosp@m..fi
License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.