projects
/
cgds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement HashTable + fix some extra blank spaces, remove Bool type (using bool ...
[cgds.git]
/
src
/
Vector.h
diff --git
a/src/Vector.h
b/src/Vector.h
index
985ac10
..
f6060f8
100644
(file)
--- a/
src/Vector.h
+++ b/
src/Vector.h
@@
-42,14
+42,14
@@
Vector* _vector_new(
/**
* @brief Return an allocated and initialized vector.
* @param type Type of a vector element (int, char*, ...).
/**
* @brief Return an allocated and initialized vector.
* @param type Type of a vector element (int, char*, ...).
- *
+ *
* Usage: Vector* vector_new(<Type> type)
*/
#define vector_new(type) \
_vector_new(sizeof(type))
/**
* Usage: Vector* vector_new(<Type> type)
*/
#define vector_new(type) \
_vector_new(sizeof(type))
/**
- * @brief Copy constructor (
works well if items do not have allocated sub-pointer
s).
+ * @brief Copy constructor (
shallow copy, ok for basic type
s).
*/
Vector* vector_copy(
Vector* vector ///< "this" pointer.
*/
Vector* vector_copy(
Vector* vector ///< "this" pointer.
@@
-58,7
+58,7
@@
Vector* vector_copy(
/**
* @brief Check if the vector is empty.
*/
/**
* @brief Check if the vector is empty.
*/
-
B
ool vector_empty(
+
b
ool vector_empty(
Vector* vector ///< "this" pointer.
);
Vector* vector ///< "this" pointer.
);
@@
-89,7
+89,7
@@
void _vector_push(
* @brief Add data at the end.
* @param vector "this" pointer.
* @param data Data to be added.
* @brief Add data at the end.
* @param vector "this" pointer.
* @param data Data to be added.
- *
+ *
* Usage: void vector_push(Vector* vector, void data)
*/
#define vector_push(vector, data) \
* Usage: void vector_push(Vector* vector, void data)
*/
#define vector_push(vector, data) \
@@
-105,13
+105,6
@@
void vector_pop(
Vector* vector ///< "this" pointer.
);
Vector* vector ///< "this" pointer.
);
-/**
- * @brief Remove the first element.
- */
-void vector_pop_first(
- Vector* vector ///< "this" pointer.
-);
-
/**
* @brief Get the element at given index.
*/
/**
* @brief Get the element at given index.
*/
@@
-125,7
+118,7
@@
void* _vector_get(
* @param vector "this" pointer.
* @param index Index of the element to retrieve.
* @param data 'out' variable to contain the result.
* @param vector "this" pointer.
* @param index Index of the element to retrieve.
* @param data 'out' variable to contain the result.
- *
+ *
* Usage: void vector_get(Vector* vector, size_t index, void data)
*/
#define vector_get(vector, index, data) \
* Usage: void vector_get(Vector* vector, size_t index, void data)
*/
#define vector_get(vector, index, data) \
@@
-148,7
+141,7
@@
void _vector_set(
* @param vector "this" pointer.
* @param index Index of the element to be modified.
* @param data New data at given index.
* @param vector "this" pointer.
* @param index Index of the element to be modified.
* @param data New data at given index.
- *
+ *
* Usage: void vector_set(Vector* vector, size_t index, void data)
*/
#define vector_set(vector, index, data) \
* Usage: void vector_set(Vector* vector, size_t index, void data)
*/
#define vector_set(vector, index, data) \
@@
-207,7
+200,7
@@
void vectorI_reset_end(
/**
* @brief Tell if there is some data at the current index.
*/
/**
* @brief Tell if there is some data at the current index.
*/
-
B
ool vectorI_has_data(
+
b
ool vectorI_has_data(
VectorIterator* vectorI ///< "this" pointer.
);
VectorIterator* vectorI ///< "this" pointer.
);
@@
-222,7
+215,7
@@
void* _vectorI_get(
* @brief Get data contained at the current index.
* @param vectorI "this" pointer.
* @param data 'out' variable to contain the result.
* @brief Get data contained at the current index.
* @param vectorI "this" pointer.
* @param data 'out' variable to contain the result.
- *
+ *
* Usage: void vectorI_get(VectorIterator* vectorI, void data);
*/
#define vectorI_get(vectorI, data) \
* Usage: void vectorI_get(VectorIterator* vectorI, void data);
*/
#define vectorI_get(vectorI, data) \
@@
-243,7
+236,7
@@
void _vectorI_set(
* @brief Set the element at current index.
* @param vectorI "this" pointer.
* @param data Data to be assigned.
* @brief Set the element at current index.
* @param vectorI "this" pointer.
* @param data Data to be assigned.
- *
+ *
* Usage: void vectorI_set(VectorIterator* vectorI, void data)
*/
#define vectorI_set(vectorI, data) \
* Usage: void vectorI_set(VectorIterator* vectorI, void data)
*/
#define vectorI_set(vectorI, data) \