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.
38 /** The type used to store database keys. */
39 typedef unsigned long value_type
;
41 /** The type to store multiple database keys with. */
42 typedef std::set
<value_type
> value_types
;
44 /** The type of a constant string reference. */
45 typedef const std::string
& cstring
;
47 /** The type of multiple non-const strings. */
48 typedef std::vector
<std::string
> Strings
;
50 #include "smart_ptr.h"
51 #include "singleton.h"
52 #include "Exceptions.h"
56 typedef SmartPtr
<Table
> TablePtr
; /**< The type of a pointer to a table. */
57 typedef std::vector
<TablePtr
> TableVector
; /**< The type of multiple table pointers. */
60 typedef SmartPtr
<TableDef
> TableDefPtr
; /**< The type of a pointer to a table def. */
61 typedef std::vector
<TableDefPtr
> TableDefVector
; /**< The type of multiple table def pointers. */
64 typedef SmartPtr
<TableImpl
> TableImplPtr
; /**< The type of a pointer to a table impl. */
65 typedef std::vector
<TableImplPtr
> TableImplVector
; /**< The type of multiple table impl pointers. */
68 typedef SmartPtr
<KeyDef
> KeyDefPtr
; /**< The type of a pointer to a key def. */
69 typedef std::vector
<KeyDefPtr
> KeyDefs
; /**< The type of multiple key def pointers. */
72 typedef SmartPtr
<KeyImpl
> KeyImplPtr
; /**< The type of a pointer to a key impl. */
73 typedef std::vector
<KeyImplPtr
> KeyImpls
; /**< The type of multiple key impl pointers. */
76 typedef SmartPtr
<KeyValue
> KeyValuePtr
; /**< The type of a pointer to a key value. */
79 typedef SmartPtr
<Field
> FieldPtr
; /**< The type of a pointer to a field. */
80 typedef std::vector
<FieldPtr
> FieldVector
; /**< The type multiple field pointers. */
83 typedef SmartPtr
<FieldDef
> FieldDefPtr
; /**< The type of a pointer to a field def. */
84 typedef std::vector
<FieldDefPtr
> FieldDefVector
; /**< The type of multiple field def pointers. */
87 typedef SmartPtr
<FieldImpl
> FieldImplPtr
; /**< The type of a pointer to a field impl. */
88 typedef std::vector
<FieldImplPtr
> FieldImplVector
; /**< The type of multiple field impl pointers. */
91 typedef SmartPtr
<FieldValue
> ValuePtr
; /**< The type of a pointer to a value. */
92 typedef SmartPtr
<FieldValue
> FieldValuePtr
; /**< A more descriptive name of of the type of a pointer to a value. */
96 * The type of a map from foreign key name to Table.
98 * @deprecated Use KeyDefs instead.
101 typedef std::map
<std::string
, TablePtr
> TableMap
;
103 /** The type of a map from KeyImpl pointers to KeyValue pointers. */
104 typedef std::map
<KeyImpl
*, KeyValuePtr
> KeyImplMap
;
106 /** The type of a map from FieldImpl pointers to Value pointers. */
107 typedef std::map
<FieldImpl
*, ValuePtr
> FieldValueMap
;
109 /** The type of a map from FieldImpl poinntiers to Value pointers. */
110 typedef std::map
<FieldImpl
*, ValuePtr
> ValueMap
;
114 typedef SmartPtr
<Keys
> KeysPtr
; /**< The type of a pointer to a keys bucket. */
117 typedef SmartPtr
<FieldValues
> ValuesPtr
; /**< The type of a pointer to a values bucket. */
118 typedef SmartPtr
<FieldValues
> FieldValuesPtr
; /**< A more precise name for the type of a pointer to a values bucket. */
120 class SavableManagers
;
121 typedef SmartPtr
<SavableManagers
> SavableManagersPtr
; /**< The type of a pointer to a savable managers bucket. */
124 class SavableManager
;
125 typedef SmartPtr
<SavableManager
> SavableManagerPtr
; /**< The type of a pointer to a savable manager. */
126 typedef std::vector
<SavableManagerPtr
> SavableManagerVector
; /**< The type of multiple savable manager pointers. */
129 typedef SmartPtr
<SelectionMask
> SelectionMaskPtr
; /**< The type of a pointer to a selection mask. */
132 typedef SmartPtr
<Relation
> RelationPtr
; /**< The type of a pointer to a relation. */
133 typedef std::vector
<RelationPtr
> Relations
; /**< The type of multiple relation pointers. */
136 typedef SmartPtr
<Join
> JoinPtr
; /**< The type of a pointer to a join. */
137 typedef std::vector
<JoinPtr
> Joins
; /**< The type of multiple join pointers. */
140 typedef SmartPtr
<Actor
> ActorPtr
; /**< The type of a pointer to an actor. */
145 typedef SmartPtr
<Savable
> SavablePtr
; /**< The type of a pointer to a Savable. */