BAM
Abstract Machine for Bottom-Up Evaluation with the Push Method
Main Page
Related Pages
Classes
Files
File List
File Members
rel
list_1.h
Go to the documentation of this file.
1
// ============================================================================
2
// Project: Deductive Database
3
// Filename: list_1.h
4
// Purpose: List of rows with one int column (relation with binding f)
5
// Last Change: 01.08.2017
6
// Language: C++
7
// EMail: brass@informatik.uni-halle.de
8
// WWW: http://www.informatik.uni-halle.de/~brass/
9
// Address: Feldschloesschen 15, D-06120 Halle (Saale), GERMANY
10
// Copyright: (c) 2015-2017 by Stefan Brass
11
// License: See file "LICENSE" for copying conditions.
12
// Note: There is no warranty at all - this code may contain bugs.
13
// ============================================================================
14
15
22
//=============================================================================
23
// Include File Frame:
24
//=============================================================================
25
26
#ifndef LIST_1_INCLUDED
27
#define LIST_1_INCLUDED
28
29
//=============================================================================
30
// Used Types and Macros:
31
//=============================================================================
32
33
#ifndef VER_INCLUDED
34
#include "../base/ver.h"
35
#endif
36
37
#ifndef STR_INCLUDED
38
#include "../base/str.h"
39
#endif
40
41
#ifndef CHECK_INCLUDED
42
#include "../base/check.h"
43
#endif
44
45
#ifndef ROW_1_INCLUDED
46
#include "../rel/row_1.h"
47
#endif
48
49
#ifndef LIST_INCLUDED
50
#include "../rel/list.h"
51
#endif
52
53
54
//=============================================================================
55
// List of Rows with one int column / Relation with binding pattern b:
56
//=============================================================================
57
58
class
list_1_c
:
public
list_c
<row_1_c> {
59
60
public
:
61
62
//-----------------------------------------------------------------------------
63
// Constructor, Destructor:
64
//-----------------------------------------------------------------------------
65
66
// Constructor:
67
list_1_c
(
str_t
list_name);
68
69
// Destructor:
70
~
list_1_c
();
71
72
//-----------------------------------------------------------------------------
73
// Copy-constructor and assignment operator are not supported for this class:
74
//-----------------------------------------------------------------------------
75
76
private
:
77
78
list_1_c
(
const
list_1_c
& obj);
// Not implemented
79
list_1_c
& operator=(
const
list_1_c
& obj);
// Not implemented
80
81
82
//=============================================================================
83
// (Object) Methods:
84
//=============================================================================
85
86
public
:
87
88
//-----------------------------------------------------------------------------
89
// insert: Insert an element into the list (returns true if successful).
90
//-----------------------------------------------------------------------------
91
92
inline
bool
insert(
int
col1) {
93
return
list_c<row_1_c>::insert
(
row_1_c
(col1));
94
}
95
96
//=============================================================================
97
// End of Class Template:
98
//=============================================================================
99
100
};
101
102
103
//-----------------------------------------------------------------------------
104
// Define pointer type:
105
//-----------------------------------------------------------------------------
106
107
typedef
list_1_c
*
list_1_t
;
108
109
//-----------------------------------------------------------------------------
110
// Define null pointer:
111
//-----------------------------------------------------------------------------
112
113
#define LIST_1_NULL (static_cast<list_1_t>(0))
114
115
116
//=============================================================================
117
// End of Include File:
118
//=============================================================================
119
120
#endif
121
str_t
const char * str_t
Definition:
str.h:41
list_1_c
Definition:
list_1.h:58
list_c
Definition:
list.h:90
row_1_c
Definition:
row_1.h:60
Generated by
1.8.10