summaryrefslogtreecommitdiff
path: root/core/pkg/tbox.pkg/inc/tbox/container
diff options
context:
space:
mode:
authorruki <[email protected]>2015-07-02 14:54:00 +0800
committerruki <[email protected]>2015-07-02 14:54:00 +0800
commitf69c00a7ddcb835fe52169fa9b7e097680fba5c1 (patch)
treefdbe29e9037607dd09335a117c730cc3f07a04d1 /core/pkg/tbox.pkg/inc/tbox/container
parentc6cc4e543cbfc3e23761ebb4cc0f825055928ed2 (diff)
update tbox and fix copy file bug
Diffstat (limited to 'core/pkg/tbox.pkg/inc/tbox/container')
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/bloom_filter.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/circle_queue.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/container.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/element.h0
-rw-r--r--core/pkg/tbox.pkg/inc/tbox/container/element/hash.h96
-rw-r--r--core/pkg/tbox.pkg/inc/tbox/container/element/prefix.h39
-rwxr-xr-xcore/pkg/tbox.pkg/inc/tbox/container/hash.h184
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/hash_map.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/hash_set.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/heap.h0
-rwxr-xr-xcore/pkg/tbox.pkg/inc/tbox/container/item.h350
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/iterator.h0
-rw-r--r--core/pkg/tbox.pkg/inc/tbox/container/iterator/prefix.h38
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/list.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/list_entry.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/prefix.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/priority_queue.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/queue.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/single_list.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/single_list_entry.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/stack.h0
-rw-r--r--[-rwxr-xr-x]core/pkg/tbox.pkg/inc/tbox/container/vector.h0
22 files changed, 173 insertions, 534 deletions
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/bloom_filter.h b/core/pkg/tbox.pkg/inc/tbox/container/bloom_filter.h
index 346e115d5..346e115d5 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/bloom_filter.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/bloom_filter.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/circle_queue.h b/core/pkg/tbox.pkg/inc/tbox/container/circle_queue.h
index 82157147c..82157147c 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/circle_queue.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/circle_queue.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/container.h b/core/pkg/tbox.pkg/inc/tbox/container/container.h
index 237ceb9c1..237ceb9c1 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/container.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/container.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/element.h b/core/pkg/tbox.pkg/inc/tbox/container/element.h
index 1ded4b0ff..1ded4b0ff 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/element.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/element.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/element/hash.h b/core/pkg/tbox.pkg/inc/tbox/container/element/hash.h
new file mode 100644
index 000000000..54a4e411a
--- /dev/null
+++ b/core/pkg/tbox.pkg/inc/tbox/container/element/hash.h
@@ -0,0 +1,96 @@
+/*!The Treasure Box Library
+ *
+ * TBox is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * TBox 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with TBox;
+ * If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a>
+ *
+ * Copyright (C) 2009 - 2015, ruki All rights reserved.
+ *
+ * @author ruki
+ * @file hash.h
+ *
+ */
+#ifndef TB_CONTAINER_ELEMENT_HASH_H
+#define TB_CONTAINER_ELEMENT_HASH_H
+
+/* //////////////////////////////////////////////////////////////////////////////////////
+ * includes
+ */
+#include "prefix.h"
+
+/* //////////////////////////////////////////////////////////////////////////////////////
+ * interfaces
+ */
+
+/* compute the uint8 hash
+ *
+ * @param value the value
+ * @param mask the mask
+ * @param index the hash func index
+ *
+ * @return the hash value
+ */
+tb_size_t tb_element_hash_uint8(tb_uint8_t value, tb_size_t mask, tb_size_t index);
+
+/* compute the uint16 hash
+ *
+ * @param value the value
+ * @param mask the mask
+ * @param index the hash func index
+ *
+ * @return the hash value
+ */
+tb_size_t tb_element_hash_uint16(tb_uint16_t value, tb_size_t mask, tb_size_t index);
+
+/* compute the uint32 hash
+ *
+ * @param value the value
+ * @param mask the mask
+ * @param index the hash func index
+ *
+ * @return the hash value
+ */
+tb_size_t tb_element_hash_uint32(tb_uint32_t value, tb_size_t mask, tb_size_t index);
+
+/* compute the uint64 hash
+ *
+ * @param value the value
+ * @param mask the mask
+ * @param index the hash func index
+ *
+ * @return the hash value
+ */
+tb_size_t tb_element_hash_uint64(tb_uint64_t value, tb_size_t mask, tb_size_t index);
+
+/* compute the data hash
+ *
+ * @param data the data
+ * @param size the size
+ * @param mask the mask
+ * @param index the hash func index
+ *
+ * @return the hash value
+ */
+tb_size_t tb_element_hash_data(tb_byte_t const* data, tb_size_t size, tb_size_t mask, tb_size_t index);
+
+/* compute the cstring hash
+ *
+ * @param cstr the cstring
+ * @param mask the mask
+ * @param index the hash func index
+ *
+ * @return the hash value
+ */
+tb_size_t tb_element_hash_cstr(tb_char_t const* cstr, tb_size_t mask, tb_size_t index);
+
+#endif
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/element/prefix.h b/core/pkg/tbox.pkg/inc/tbox/container/element/prefix.h
new file mode 100644
index 000000000..51bf8c8a4
--- /dev/null
+++ b/core/pkg/tbox.pkg/inc/tbox/container/element/prefix.h
@@ -0,0 +1,39 @@
+/*!The Treasure Box Library
+ *
+ * TBox is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * TBox 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with TBox;
+ * If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a>
+ *
+ * Copyright (C) 2009 - 2015, ruki All rights reserved.
+ *
+ * @author ruki
+ * @file prefix.h
+ *
+ */
+#ifndef TB_CONTAINER_ELEMENT_PREFIX_H
+#define TB_CONTAINER_ELEMENT_PREFIX_H
+
+/* //////////////////////////////////////////////////////////////////////////////////////
+ * includes
+ */
+#include "../prefix.h"
+#include "../element.h"
+#include "../../libc/libc.h"
+#include "../../utils/utils.h"
+#include "../../memory/memory.h"
+#include "../../object/object.h"
+#include "../../stream/stream.h"
+#include "../../platform/platform.h"
+
+
+#endif
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/hash.h b/core/pkg/tbox.pkg/inc/tbox/container/hash.h
deleted file mode 100755
index 39cb36724..000000000
--- a/core/pkg/tbox.pkg/inc/tbox/container/hash.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*!The Treasure Box Library
- *
- * TBox is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * TBox 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with TBox;
- * If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a>
- *
- * Copyright (C) 2009 - 2015, ruki All rights reserved.
- *
- * @author ruki
- * @file hash.h
- * @ingroup container
- *
- */
-#ifndef TB_CONTAINER_HASH_H
-#define TB_CONTAINER_HASH_H
-
-/* //////////////////////////////////////////////////////////////////////////////////////
- * includes
- */
-#include "prefix.h"
-#include "item.h"
-#include "iterator.h"
-
-/* //////////////////////////////////////////////////////////////////////////////////////
- * extern
- */
-__tb_extern_c_enter__
-
-/* //////////////////////////////////////////////////////////////////////////////////////
- * macros
- */
-
-// the hash bulk size
-#define TB_HASH_BULK_SIZE_MICRO (64)
-#define TB_HASH_BULK_SIZE_SMALL (256)
-#define TB_HASH_BULK_SIZE_LARGE (65536)
-
-/* //////////////////////////////////////////////////////////////////////////////////////
- * types
- */
-
-/// the hash item type
-typedef struct __tb_hash_item_t
-{
- /// the item name
- tb_pointer_t name;
-
- /// the item data
- tb_pointer_t data;
-
-}tb_hash_item_t, *tb_hash_item_ref_t;
-
-/*! the hash ref type
- *
- * <pre>
- * 0 1 3 ... ... n n + 1
- * hash_list: |--------|--------|--------|--------|--------|--------|--------|--------|
- * |
- * -----
- * item_list: | | key:0
- * -----
- * | | key:1
- * ----- <= insert by binary search algorithm
- * | | key:2
- * -----
- * | | key:3
- * -----
- * | | key:4
- * -----
- * | |
- * -----
- * | |
- * -----
- * | |
- * -----
- *
- * </pre>
- *
- * @note the itor of the same item is mutable
- */
-typedef tb_iterator_ref_t tb_hash_ref_t;
-
-/* //////////////////////////////////////////////////////////////////////////////////////
- * interfaces
- */
-
-/*! init hash
- *
- * @param bulk_size the hash bulk size, using the default size if be zero
- * @param name_func the hash name func
- * @param data_func the hash data func
- *
- * @return the hash
- */
-tb_hash_ref_t tb_hash_init(tb_size_t bulk_size, tb_item_func_t name_func, tb_item_func_t data_func);
-
-/*! exit hash
- *
- * @param hash the hash
- */
-tb_void_t tb_hash_exit(tb_hash_ref_t hash);
-
-/*! clear hash
- *
- * @param hash the hash
- */
-tb_void_t tb_hash_clear(tb_hash_ref_t hash);
-
-/*! get hash item itor
- *
- * @param hash the hash
- * @param name the hash item name
- *
- * @return the hash itor, @note: itor => item maybe changed if insert or remove item
- */
-tb_size_t tb_hash_itor(tb_hash_ref_t hash, tb_cpointer_t name);
-
-/*! get hash item data
- *
- * @param hash the hash
- * @param name the hash item name
- *
- * @return the hash item data
- */
-tb_pointer_t tb_hash_get(tb_hash_ref_t hash, tb_cpointer_t name);
-
-/*! del hash item
- *
- * @param hash the hash
- * @param name the hash item name
- */
-tb_void_t tb_hash_del(tb_hash_ref_t hash, tb_cpointer_t name);
-
-/*! set hash item
- *
- * @param hash the hash
- * @param name the hash item name
- * @param data the hash item data
- *
- * @return the hash itor, @note: itor => item maybe changed if insert or remove item
- */
-tb_size_t tb_hash_set(tb_hash_ref_t hash, tb_cpointer_t name, tb_cpointer_t data);
-
-/*! the hash size
- *
- * @param hash the hash
- *
- * @return the hash size
- */
-tb_size_t tb_hash_size(tb_hash_ref_t hash);
-
-/*! the hash maxn
- *
- * @param hash the hash
- *
- * @return the hash maxn
- */
-tb_size_t tb_hash_maxn(tb_hash_ref_t hash);
-
-#ifdef __tb_debug__
-/*! dump hash
- *
- * @param hash the hash
- */
-tb_void_t tb_hash_dump(tb_hash_ref_t hash);
-#endif
-
-/* //////////////////////////////////////////////////////////////////////////////////////
- * extern
- */
-__tb_extern_c_leave__
-
-#endif
-
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/hash_map.h b/core/pkg/tbox.pkg/inc/tbox/container/hash_map.h
index 976369f6f..976369f6f 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/hash_map.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/hash_map.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/hash_set.h b/core/pkg/tbox.pkg/inc/tbox/container/hash_set.h
index db0e930e8..db0e930e8 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/hash_set.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/hash_set.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/heap.h b/core/pkg/tbox.pkg/inc/tbox/container/heap.h
index 612618bca..612618bca 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/heap.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/heap.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/item.h b/core/pkg/tbox.pkg/inc/tbox/container/item.h
deleted file mode 100755
index 35b48a8ea..000000000
--- a/core/pkg/tbox.pkg/inc/tbox/container/item.h
+++ /dev/null
@@ -1,350 +0,0 @@
-/*!The Treasure Box Library
- *
- * TBox is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * TBox 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with TBox;
- * If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a>
- *
- * Copyright (C) 2009 - 2015, ruki All rights reserved.
- *
- * @author ruki
- * @file item.h
- * @ingroup container
- *
- */
-#ifndef TB_CONTAINER_ITEM_H
-#define TB_CONTAINER_ITEM_H
-
-/* //////////////////////////////////////////////////////////////////////////////////////
- * includes
- */
-#include "prefix.h"
-
-/* //////////////////////////////////////////////////////////////////////////////////////
- * extern
- */
-__tb_extern_c_enter__
-
-/* //////////////////////////////////////////////////////////////////////////////////////
- * types
- */
-
-struct __tb_item_func_t;
-
-/*! the item data hash func type
- *
- * @param func the item func
- * @param data the item data
- * @param mask the hash mask
- * @param index the hash index
- *
- * @return the hash value
- */
-typedef tb_size_t (*tb_item_func_hash_t)(struct __tb_item_func_t* func, tb_cpointer_t data, tb_size_t mask, tb_size_t index);
-
-/*! the item data compare func type
- *
- * @param func the item func
- * @param ldata the left-hand data
- * @param rdata the right-hand data
- *
- * @return equal: 0, 1: >, -1: <
- */
-typedef tb_long_t (*tb_item_func_comp_t)(struct __tb_item_func_t* func, tb_cpointer_t ldata, tb_cpointer_t rdata);
-
-/*! the item data func type
- *
- * @param func the item func
- * @param buff the item data address
- *
- * @return the item data
- */
-typedef tb_pointer_t (*tb_item_func_data_t)(struct __tb_item_func_t* func, tb_cpointer_t buff);
-
-/*! the item data string func type
- *
- * @param func the item func
- * @param data the item data
- * @param cstr the string buffer
- * @param maxn the string buffer maximum size
- *
- * @return the string pointer
- */
-typedef tb_char_t const* (*tb_item_func_cstr_t)(struct __tb_item_func_t* func, tb_cpointer_t data, tb_char_t* cstr, tb_size_t maxn);
-
-/*! the item data load func type
- *
- * load data to the item from the stream
- *
- * @param func the item func
- * @param buff the item buffer
- * @param stream the stream
- *
- * @return tb_true or tb_false
- */
-typedef tb_bool_t (*tb_item_func_load_t)(struct __tb_item_func_t* func, tb_pointer_t buff, tb_stream_ref_t stream);
-
-/*! the item data save func type
- *
- * save data to the stream
- *
- * @param func the item func
- * @param data the item data
- * @param stream the stream
- *
- * @return tb_true or tb_false
- */
-typedef tb_bool_t (*tb_item_func_save_t)(struct __tb_item_func_t* func, tb_cpointer_t data, tb_stream_ref_t stream);
-
-/*! the item free func type
- *
- * @param func the item func
- * @param buff the item buffer
- */
-typedef tb_void_t (*tb_item_func_free_t)(struct __tb_item_func_t* func, tb_pointer_t buff);
-
-/*! the item duplicate func type
- *
- * allocate a new item and copy the item data
- *
- * @param func the item func
- * @param buff the item buffer
- * @param data the item data
- */
-typedef tb_void_t (*tb_item_func_dupl_t)(struct __tb_item_func_t* func, tb_pointer_t buff, tb_cpointer_t data);
-
-/*! the item replace func type
- *
- * free the previous item data and duplicate the new data
- *
- * @param func the item func
- * @param buff the item buffer
- * @param data the item data
- */
-typedef tb_void_t (*tb_item_func_repl_t)(struct __tb_item_func_t* func, tb_pointer_t buff, tb_cpointer_t data);
-
-/*! the item copy func type
- *
- * only copy the item data and not allocate new item
- *
- * @param func the item func
- * @param buff the item data address
- * @param data the item data
- */
-typedef tb_void_t (*tb_item_func_copy_t)(struct __tb_item_func_t* func, tb_pointer_t buff, tb_cpointer_t data);
-
-/*! the items free func type
- *
- * free some items
- *
- * @param func the item func
- * @param buff the item buffer
- * @param size the item count
- */
-typedef tb_void_t (*tb_item_func_nfree_t)(struct __tb_item_func_t* func, tb_pointer_t buff, tb_size_t size);
-
-/*! the items duplicate func type
- *
- * duplicate some items
- *
- * @param func the item func
- * @param buff the item buffer
- * @param data the item data
- * @param size the item count
- */
-typedef tb_void_t (*tb_item_func_ndupl_t)(struct __tb_item_func_t* func, tb_pointer_t buff, tb_cpointer_t data, tb_size_t size);
-
-/*! the items replace func type
- *
- * replace some items
- *
- * @param func the item func
- * @param buff the item buffer
- * @param data the item data
- * @param size the item count
- */
-typedef tb_void_t (*tb_item_func_nrepl_t)(struct __tb_item_func_t* func, tb_pointer_t buff, tb_cpointer_t data, tb_size_t size);
-
-/*! the items copy func type
- *
- * copy some items
- *
- * @param func the item func
- * @param buff the item buffer
- * @param data the item data
- * @param size the item count
- */
-typedef tb_void_t (*tb_item_func_ncopy_t)(struct __tb_item_func_t* func, tb_pointer_t buff, tb_cpointer_t data, tb_size_t size);
-
-/// the item type
-typedef enum __tb_item_type_t
-{
- TB_ITEM_TYPE_NULL = 0 //!< null
-, TB_ITEM_TYPE_LONG = 1 //!< integer for tb_long_t
-, TB_ITEM_TYPE_SIZE = 2 //!< integer for tb_size_t
-, TB_ITEM_TYPE_UINT8 = 3 //!< integer for tb_uint8_t
-, TB_ITEM_TYPE_UINT16 = 4 //!< integer for tb_uint16_t
-, TB_ITEM_TYPE_UINT32 = 5 //!< integer for tb_uint32_t
-, TB_ITEM_TYPE_STR = 6 //!< string
-, TB_ITEM_TYPE_PTR = 7 //!< pointer
-, TB_ITEM_TYPE_MEM = 8 //!< memory
-, TB_ITEM_TYPE_OBJ = 9 //!< object
-, TB_ITEM_TYPE_TRUE = 10 //!< true
-, TB_ITEM_TYPE_USER = 11 //!< the user defined type
-
-}tb_item_type_t;
-
-/// the item func type
-typedef struct __tb_item_func_t
-{
- /// the item type
- tb_uint16_t type;
-
- /// the item flag
- tb_uint16_t flag;
-
- /// the item size
- tb_uint16_t size;
-
- /// the priv data
- tb_cpointer_t priv;
-
- /// the hash func
- tb_item_func_hash_t hash;
-
- /// the compare func
- tb_item_func_comp_t comp;
-
- /// the data func
- tb_item_func_data_t data;
-
- /// the string func
- tb_item_func_cstr_t cstr;
-
- /// the free item func
- tb_item_func_free_t free;
-
- /// the duplicate func
- tb_item_func_dupl_t dupl;
-
- /// the replace func
- tb_item_func_repl_t repl;
-
- /// the copy func
- tb_item_func_copy_t copy;
-
- /// the free items func
- tb_item_func_nfree_t nfree;
-
- /// the duplicate items func
- tb_item_func_ndupl_t ndupl;
-
- /// the replace items func
- tb_item_func_nrepl_t nrepl;
-
- /// the copy items func
- tb_item_func_ncopy_t ncopy;
-
-}tb_item_func_t;
-
-/* //////////////////////////////////////////////////////////////////////////////////////
- * interfaces
- */
-
-/*! the null item function, no space
- *
- * @return the item func
- */
-tb_item_func_t tb_item_func_null(tb_noarg_t);
-
-/*! the true item function, no space
- *
- * .e.g for hash data
- *
- * @return the item func
- */
-tb_item_func_t tb_item_func_true(tb_noarg_t);
-
-/*! the integer item function for tb_long_t
- *
- * @return the item func
- */
-tb_item_func_t tb_item_func_long(tb_noarg_t);
-
-/*! the integer item function for tb_size_t
- *
- * @return the item func
- */
-tb_item_func_t tb_item_func_size(tb_noarg_t);
-
-/*! the integer item function for tb_uint8_t
- *
- * @return the item func
- */
-tb_item_func_t tb_item_func_uint8(tb_noarg_t);
-
-/*! the integer item function for tb_uint16_t
- *
- * @return the item func
- */
-tb_item_func_t tb_item_func_uint16(tb_noarg_t);
-
-/*! the integer item function for tb_uint32_t
- *
- * @return the item func
- */
-tb_item_func_t tb_item_func_uint32(tb_noarg_t);
-
-/*! the string item function
- *
- * @param bcase is case?
- *
- * @return the item func
- */
-tb_item_func_t tb_item_func_str(tb_bool_t bcase);
-
-/*! the pointer item function
- *
- * @note if the free func have been hooked, the nfree need hook too.
- *
- * @param free the item free func
- * @param priv the private data of the item free func
- *
- * @return the item func
- */
-tb_item_func_t tb_item_func_ptr(tb_item_func_free_t free, tb_cpointer_t priv);
-
-/*! the object item function
- *
- * @return the item func
- */
-tb_item_func_t tb_item_func_obj(tb_noarg_t);
-
-/*! the internal fixed memory item function
- *
- * storing it in the internal item of the container directly for saving memory
- *
- * @param size the item size
- * @param free the item free func
- * @param priv the private data of the item free func
- *
- * @return the item func
- */
-tb_item_func_t tb_item_func_mem(tb_size_t size, tb_item_func_free_t free, tb_cpointer_t priv);
-
-/* //////////////////////////////////////////////////////////////////////////////////////
- * extern
- */
-__tb_extern_c_leave__
-
-#endif
-
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/iterator.h b/core/pkg/tbox.pkg/inc/tbox/container/iterator.h
index c0d26e620..c0d26e620 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/iterator.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/iterator.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/iterator/prefix.h b/core/pkg/tbox.pkg/inc/tbox/container/iterator/prefix.h
new file mode 100644
index 000000000..d84483189
--- /dev/null
+++ b/core/pkg/tbox.pkg/inc/tbox/container/iterator/prefix.h
@@ -0,0 +1,38 @@
+/*!The Treasure Box Library
+ *
+ * TBox is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * TBox 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with TBox;
+ * If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a>
+ *
+ * Copyright (C) 2009 - 2015, ruki All rights reserved.
+ *
+ * @author ruki
+ * @file prefix.h
+ *
+ */
+#ifndef TB_CONTAINER_ITERATOR_PREFIX_H
+#define TB_CONTAINER_ITERATOR_PREFIX_H
+
+/* //////////////////////////////////////////////////////////////////////////////////////
+ * includes
+ */
+#include "../prefix.h"
+#include "../iterator.h"
+#include "../../libc/libc.h"
+#include "../../utils/utils.h"
+#include "../../memory/memory.h"
+#include "../../object/object.h"
+#include "../../platform/platform.h"
+
+
+#endif
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/list.h b/core/pkg/tbox.pkg/inc/tbox/container/list.h
index f27c4935a..f27c4935a 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/list.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/list.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/list_entry.h b/core/pkg/tbox.pkg/inc/tbox/container/list_entry.h
index 810736b64..810736b64 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/list_entry.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/list_entry.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/prefix.h b/core/pkg/tbox.pkg/inc/tbox/container/prefix.h
index 3dde431fe..3dde431fe 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/prefix.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/prefix.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/priority_queue.h b/core/pkg/tbox.pkg/inc/tbox/container/priority_queue.h
index 2e87a64ae..2e87a64ae 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/priority_queue.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/priority_queue.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/queue.h b/core/pkg/tbox.pkg/inc/tbox/container/queue.h
index 8aa5a98aa..8aa5a98aa 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/queue.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/queue.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/single_list.h b/core/pkg/tbox.pkg/inc/tbox/container/single_list.h
index 861c749c0..861c749c0 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/single_list.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/single_list.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/single_list_entry.h b/core/pkg/tbox.pkg/inc/tbox/container/single_list_entry.h
index a5e0923a3..a5e0923a3 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/single_list_entry.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/single_list_entry.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/stack.h b/core/pkg/tbox.pkg/inc/tbox/container/stack.h
index d357eca0a..d357eca0a 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/stack.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/stack.h
diff --git a/core/pkg/tbox.pkg/inc/tbox/container/vector.h b/core/pkg/tbox.pkg/inc/tbox/container/vector.h
index 53b3e111d..53b3e111d 100755..100644
--- a/core/pkg/tbox.pkg/inc/tbox/container/vector.h
+++ b/core/pkg/tbox.pkg/inc/tbox/container/vector.h