gambas-source-code/main/lib/data/main.c

82 lines
1.5 KiB
C
Raw Normal View History

/*
* main.c - gb.data glue
*
* Copyright (C) 2012/3 Tobias Boege <tobias@gambas-buch.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#define __MAIN_C
#include "c_list.h"
#include "c_deque.h"
#include "c_circular.h"
#include "c_avltree.h"
#include "c_trie.h"
#include "c_graph.h"
#include "c_graphmatrix.h"
#include "c_heap.h"
#include "main.h"
GB_INTERFACE GB EXPORT;
GB_DESC *GB_CLASSES[] EXPORT = {
[GB.DATA] * BUG: Fix possible bugs when updating an invalid Current. * BUG: Really erase old elements instead of just marking them as Null to prevent (potential) information leaks. * OPT: Current and the enumerators (internally) carry list global indices (LGI) which can be used as anchor points together with List.Count to speed up traversals (always taking the shortest way through the list). * OPT: Remove workaround code related to an enumerator bug fixed in #5749. * NEW: Expose List.Current as a virtual object representing the current list element which has Append() and Prepend() methods to manipulate the list not only around its head. This breaks backwards compatibility. * NEW: List.Value is what List.Current has meant formerly. * NEW: Add List.Current.Index and List.Index which are an absolute index of the current element into the list. These are guaranteed to be in bounds of [-List.Count; List.Count - 1]. Note that each non-negative index has an associated negative equivalent and vice versa. They work like the indices given to List._get(). * NEW: Add a List.AutoNormalize property which instructs the list to automatically make indices (like resulting from a calculation) fit into the List bounds preserving the sign of the given index. This effectively prevents any "Out of bounds" errors. * NEW: Add List.MoveTo() to point Current to an index. * NEW: List.Current.Is{First,Last,Valid} can be used to determine if Current is the first or last element of the list or if it is valid, respectively. git-svn-id: svn://localhost/gambas/trunk@5778 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2013-08-09 20:31:20 +02:00
CList,
CListBackwards,
CListItem,
[GB.DATA] * BUG: Fix possible bugs when updating an invalid Current. * BUG: Really erase old elements instead of just marking them as Null to prevent (potential) information leaks. * OPT: Current and the enumerators (internally) carry list global indices (LGI) which can be used as anchor points together with List.Count to speed up traversals (always taking the shortest way through the list). * OPT: Remove workaround code related to an enumerator bug fixed in #5749. * NEW: Expose List.Current as a virtual object representing the current list element which has Append() and Prepend() methods to manipulate the list not only around its head. This breaks backwards compatibility. * NEW: List.Value is what List.Current has meant formerly. * NEW: Add List.Current.Index and List.Index which are an absolute index of the current element into the list. These are guaranteed to be in bounds of [-List.Count; List.Count - 1]. Note that each non-negative index has an associated negative equivalent and vice versa. They work like the indices given to List._get(). * NEW: Add a List.AutoNormalize property which instructs the list to automatically make indices (like resulting from a calculation) fit into the List bounds preserving the sign of the given index. This effectively prevents any "Out of bounds" errors. * NEW: Add List.MoveTo() to point Current to an index. * NEW: List.Current.Is{First,Last,Valid} can be used to determine if Current is the first or last element of the list or if it is valid, respectively. git-svn-id: svn://localhost/gambas/trunk@5778 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2013-08-09 20:31:20 +02:00
CDeque,
CStack,
CQueue,
CPrioQueue,
[GB.DATA] * BUG: Fix possible bugs when updating an invalid Current. * BUG: Really erase old elements instead of just marking them as Null to prevent (potential) information leaks. * OPT: Current and the enumerators (internally) carry list global indices (LGI) which can be used as anchor points together with List.Count to speed up traversals (always taking the shortest way through the list). * OPT: Remove workaround code related to an enumerator bug fixed in #5749. * NEW: Expose List.Current as a virtual object representing the current list element which has Append() and Prepend() methods to manipulate the list not only around its head. This breaks backwards compatibility. * NEW: List.Value is what List.Current has meant formerly. * NEW: Add List.Current.Index and List.Index which are an absolute index of the current element into the list. These are guaranteed to be in bounds of [-List.Count; List.Count - 1]. Note that each non-negative index has an associated negative equivalent and vice versa. They work like the indices given to List._get(). * NEW: Add a List.AutoNormalize property which instructs the list to automatically make indices (like resulting from a calculation) fit into the List bounds preserving the sign of the given index. This effectively prevents any "Out of bounds" errors. * NEW: Add List.MoveTo() to point Current to an index. * NEW: List.Current.Is{First,Last,Valid} can be used to determine if Current is the first or last element of the list or if it is valid, respectively. git-svn-id: svn://localhost/gambas/trunk@5778 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2013-08-09 20:31:20 +02:00
CCircular,
CAvlTree,
CTrie,
CTriePrefix,
CGraph,
CGraphVertices,
CGraphEdges,
CGraphInEdges,
CGraphOutEdges,
CGraphAdjacent,
CGraphVertex,
CGraphEdge,
CGraphMatrix,
CMatrixVertices,
CMatrixEdges,
CMatrixVertex,
CMatrixEdge,
CHeap,
NULL
};
int EXPORT GB_INIT()
{
return 0;
}
void EXPORT GB_EXIT()
{
}