DataSetCapabilities.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib 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 Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/dataaccess/dataset/DataSetCapabilities.cpp
22 
23  \brief A class that informs what the dataset implementation of a given data source can perform.
24 */
25 
26 // TerraLib
27 #include "DataSetCapabilities.h"
28 
30  : m_bidirectional(false),
31  m_random(false),
32  m_indexed(false),
33  m_efficientMovePrevious(false),
34  m_efficientMoveBeforeFirst(false),
35  m_efficientMoveLast(false),
36  m_efficientMoveAfterLast(false),
37  m_efficientMove(false),
38  m_efficientSize(false)
39 {
40 }
41 
43 
45 {
46  return m_bidirectional;
47 }
48 
50 {
51  m_bidirectional = support;
52 }
53 
55 {
56  return m_random;
57 }
58 
60 {
61  m_random = support;
62 }
63 
65 {
66  return m_indexed;
67 }
68 
70 {
71  m_indexed = support;
72 }
73 
75 {
77 }
78 
80 {
81  m_efficientMovePrevious = support;
82 }
83 
85 {
87 }
88 
90 {
92 }
93 
95 {
96  return m_efficientMoveLast;
97 }
98 
100 {
101  m_efficientMoveLast = support;
102 }
103 
105 {
107 }
108 
110 {
111  m_efficientMoveAfterLast = support;
112 }
113 
115 {
116  return m_efficientMove;
117 }
118 
120 {
121  m_efficientMove = support;
122 }
123 
125 {
126  return m_efficientSize;
127 }
128 
130 {
131  m_efficientSize = support;
132 }
133 
135 {
136  return m_isConnected;
137 }
138 
140 {
141  m_isConnected = connected;
142 }
143 
145 {
146  m_bidirectional = true;
147  m_random = true;
148  m_indexed = true;
151  m_efficientMoveLast = true;
153  m_efficientMove = true;
154  m_efficientSize = true;
155 }
bool m_efficientMoveAfterLast
A flag that indicates if the performance of move after last operation has no penality.
bool m_random
A flag that indicates if the data set supports traversing in a random way.
void setSupportEfficientMoveAfterLast(const bool &support)
bool m_isConnected
A flag that indicates if the data set is conneted.
void setSupportEfficientMove(const bool &support)
void setSupportEfficientMovePrevious(const bool &support)
void setAsConnected(const bool &connected)
void setSupportEfficientMoveBeforeFirst(const bool &support)
~DataSetCapabilities()
Destructor.
bool m_efficientMoveBeforeFirst
A flag that indicates if the performance of move before first operation has no penality.
void setSupportEfficientMoveLast(const bool &support)
void setSupportIndexedTraversing(const bool &support)
void setSupportBidirectionalTraversing(const bool &support)
A class that informs what the dataset implementation of a given data source can perform.
bool m_bidirectional
A flag that indicates if the data set supports traversing in a bidirectional way. ...
void setSupportRandomTraversing(const bool &support)
bool m_efficientMoveLast
A flag that indicates if the performance of move last operation has no penality.
bool m_efficientMovePrevious
A flag that indicates if the performance of move previous operation has no penality.
bool m_efficientMove
A flag that indicates if the performance of move operation has no penality.
bool supportsEfficientMoveBeforeFirst() const
bool m_indexed
A flag that indicates if the data set supports traversing using a given key.
bool m_efficientSize
A flag that indicates if the performance of getting data set size operation has no penality...
void setSupportEfficientDataSetSize(const bool &support)