1 /***************************************************************************
2 * Copyright (C) 2008 by Sverre Rabbelier *
3 * sverre@rabbelier.nl *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 3 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
25 * This file contains all type definitions.
36 /** The type used to store database keys. */
37 typedef unsigned long value_type
;
39 /** The type to store multiple database keys with. */
40 typedef std::set
<value_type
> value_types
;
42 /** The type of a constant string reference. */
43 typedef const std::string
& cstring
;
45 /** The type of multiple non-const strings. */
46 typedef std::vector
<std::string
> Strings
;
48 #include "smart_ptr.h"
49 #include "singleton.h"
50 #include "Exceptions.h"
54 typedef SmartPtr
<Table
> TablePtr
; /**< The type of a pointer to a table. */
55 typedef std::vector
<TablePtr
> TableVector
; /**< The type of multiple table pointers. */
58 typedef SmartPtr
<TableDef
> TableDefPtr
; /**< The type of a pointer to a table def. */
59 typedef std::vector
<TableDefPtr
> TableDefVector
; /**< The type of multiple table def pointers. */
62 typedef SmartPtr
<TableImpl
> TableImplPtr
; /**< The type of a pointer to a table impl. */
63 typedef std::vector
<TableImplPtr
> TableImplVector
; /**< The type of multiple table impl pointers. */
66 typedef SmartPtr
<KeyDef
> KeyDefPtr
; /**< The type of a pointer to a key def. */
67 typedef std::vector
<KeyDefPtr
> KeyDefs
; /**< The type of multiple key def pointers. */
70 typedef SmartPtr
<KeyImpl
> KeyImplPtr
; /**< The type of a pointer to a key impl. */
71 typedef std::vector
<KeyImplPtr
> KeyImpls
; /**< The type of multiple key impl pointers. */
74 typedef SmartPtr
<KeyValue
> KeyValuePtr
; /**< The type of a pointer to a key value. */
77 typedef SmartPtr
<Field
> FieldPtr
; /**< The type of a pointer to a field. */
78 typedef std::vector
<FieldPtr
> FieldVector
; /**< The type multiple field pointers. */
81 typedef SmartPtr
<FieldDef
> FieldDefPtr
; /**< The type of a pointer to a field def. */
82 typedef std::vector
<FieldDefPtr
> FieldDefVector
; /**< The type of multiple field def pointers. */
85 typedef SmartPtr
<FieldImpl
> FieldImplPtr
; /**< The type of a pointer to a field impl. */
86 typedef std::vector
<FieldImplPtr
> FieldImplVector
; /**< The type of multiple field impl pointers. */
89 typedef SmartPtr
<FieldValue
> ValuePtr
; /**< The type of a pointer to a value. */
90 typedef SmartPtr
<FieldValue
> FieldValuePtr
; /**< A more descriptive name of of the type of a pointer to a value. */
94 * The type of a map from foreign key name to Table.
96 * @deprecated Use KeyDefs instead.
99 typedef std::map
<std::string
, TablePtr
> TableMap
;
101 /** The type of a map from KeyImpl pointers to KeyValue pointers. */
102 typedef std::map
<KeyImpl
*, KeyValuePtr
> KeyImplMap
;
104 /** The type of a map from FieldImpl pointers to Value pointers. */
105 typedef std::map
<FieldImpl
*, ValuePtr
> FieldValueMap
;
107 /** The type of a map from FieldImpl poinntiers to Value pointers. */
108 typedef std::map
<FieldImpl
*, ValuePtr
> ValueMap
;
112 typedef SmartPtr
<Keys
> KeysPtr
; /**< The type of a pointer to a keys bucket. */
115 typedef SmartPtr
<FieldValues
> ValuesPtr
; /**< The type of a pointer to a values bucket. */
116 typedef SmartPtr
<FieldValues
> FieldValuesPtr
; /**< A more precise name for the type of a pointer to a values bucket. */
118 class SavableManagers
;
119 typedef SmartPtr
<SavableManagers
> SavableManagersPtr
; /**< The type of a pointer to a savable managers bucket. */
122 class SavableManager
;
123 typedef SmartPtr
<SavableManager
> SavableManagerPtr
; /**< The type of a pointer to a savable manager. */
124 typedef std::vector
<SavableManagerPtr
> SavableManagerVector
; /**< The type of multiple savable manager pointers. */
127 typedef SmartPtr
<SelectionMask
> SelectionMaskPtr
; /**< The type of a pointer to a selection mask. */
130 typedef SmartPtr
<Relation
> RelationPtr
; /**< The type of a pointer to a relation. */
131 typedef std::vector
<RelationPtr
> Relations
; /**< The type of multiple relation pointers. */
134 typedef SmartPtr
<Join
> JoinPtr
; /**< The type of a pointer to a join. */
135 typedef std::vector
<JoinPtr
> Joins
; /**< The type of multiple join pointers. */
138 typedef SmartPtr
<Actor
> ActorPtr
; /**< The type of a pointer to an actor. */
143 typedef SmartPtr
<Savable
> SavablePtr
; /**< The type of a pointer to a Savable. */