/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to src/Map.h

  • Committer: Gustav Hartvigsson
  • Date: 2015-04-10 15:24:35 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20150410152435-uumooulvwmn02rxb
* Renamed DynamicArray to SDynamicArray.
* Renamed dynamic_array_*() functions to s_dynamic_array_*()
* Fixed indentation problem in Error.h and defs.h
* Removed dependency on stdbool.h
* Added sboolean
* Addad sconstpointer
* Reverted SMap back no not depending on SObject.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#ifndef __H_MAP__
24
24
#define __H_MAP__
25
25
 
26
 
 
27
 
#include "baseobject.h"
28
26
#include "Func.h"
29
27
#include "defs.h"
30
28
#include "utils.h"
31
 
#include <stdbool.h>
32
29
 
33
30
BEGIN_DECLS
34
31
 
58
55
/** @brief
59
56
 * An SMap is a map many SMapItems. Mapping between a key and a value.
60
57
 * 
61
 
 * functions:
62
 
 * * s_map_new()
63
 
 * * s_map_free()
64
 
 * * s_map_add()
65
 
 * * s_map_get()
 
58
 * An SMap is not dependent on SObject, because it should be more generic
 
59
 * and have the ability to be used more easily in other SObject based classes
 
60
 * without causing circular dependencies.
 
61
 *
 
62
 * @sa SDynamicArray
 
63
 * @sa SLinkedList
66
64
 */
67
65
typedef struct SMap SMap;
68
66
 
84
82
 * Data structure representing an SMap
85
83
 */
86
84
struct SMap {
87
 
  SObject parent;
88
85
  SMapPrivate * priv; /**< Private data pointer */
89
86
};
90
87
 
91
88
struct SMapClass {
92
 
  SObjectClass parent_class;
93
89
  CompFunc is_equal; /** method to check if items are equal. */
94
90
  FuncPointer free_key;
95
91
  FuncPointer free_value;