TPIE

2362a60
err.h
Go to the documentation of this file.
1 // -*- mode: c++; tab-width: 4; indent-tabs-mode: t; c-file-style: "stroustrup"; -*-
2 // vi:set ts=4 sts=4 sw=4 noet :
3 // Copyright 2008, The TPIE development team
4 //
5 // This file is part of TPIE.
6 //
7 // TPIE is free software: you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License as published by the
9 // Free Software Foundation, either version 3 of the License, or (at your
10 // option) any later version.
11 //
12 // TPIE is distributed in the hope that it will be useful, but WITHOUT ANY
13 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 // License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with TPIE. If not, see <http://www.gnu.org/licenses/>
19 
20 #ifndef _TPIE_AMI_ERR_H
21 #define _TPIE_AMI_ERR_H
22 
23 // Windows headers defined this constant too,
24 // so undef it if the user insists on using the old
25 // error codes.
26 #ifdef NO_ERROR
27 #undef NO_ERROR
28 #endif
29 
34 
35 namespace tpie {
36 
37  namespace ami {
38 
45  enum err {
47  NO_ERROR = 0,
90  NO_MAIN_MEMORY_OPERATION,
100 
101  GENERIC_ERROR = 0xfff,
102 
106  SCAN_DONE = 0x1000,
110 
112  MERGE_DONE = 0x2000,
124 
126  MATRIX_BOUNDS = 0x3000,
127 
130 
131  };
132 
133  } // ami namespace
134 
135 } // tpie namespace
136 
137 #define USE_OLD_ERROR_CODES 1
138 
139 #if USE_OLD_ERROR_CODES
140  enum AMI_err {
141  AMI_ERROR_NO_ERROR = 0,
142  AMI_ERROR_IO_ERROR,
143  AMI_ERROR_END_OF_STREAM,
144  AMI_ERROR_READ_ONLY,
145  AMI_ERROR_OS_ERROR,
146  AMI_ERROR_BASE_METHOD,
147  AMI_ERROR_BTE_ERROR,
148  AMI_ERROR_MM_ERROR,
149  AMI_ERROR_OBJECT_INITIALIZATION,
150  AMI_ERROR_OBJECT_INVALID,
151  AMI_ERROR_PERMISSION_DENIED,
152  AMI_ERROR_INSUFFICIENT_MAIN_MEMORY,
153  AMI_ERROR_INSUFFICIENT_AVAILABLE_STREAMS,
154  AMI_ERROR_ENV_UNDEFINED,
155  AMI_ERROR_NO_MAIN_MEMORY_OPERATION,
156  AMI_ERROR_BIT_MATRIX_BOUNDS,
157  AMI_ERROR_NOT_POWER_OF_2,
158  AMI_ERROR_NULL_POINTER,
159 
160  AMI_ERROR_GENERIC_ERROR = 0xfff,
161 
162  // Values returned by scan objects.
163  AMI_SCAN_DONE = 0x1000,
164  AMI_SCAN_CONTINUE,
165 
166  // Values returned by merge objects.
167  AMI_MERGE_DONE = 0x2000,
168  AMI_MERGE_CONTINUE,
169  AMI_MERGE_OUTPUT,
170  AMI_MERGE_READ_MULTIPLE,
171 
172  // Matrix related errors
173  AMI_MATRIX_BOUNDS = 0x3000,
174 
175  // Values returned by sort routines.
176  AMI_SORT_ALREADY_SORTED = 0x4000
177 
178  };
179 #endif
180 
181 #endif // _TPIE_AMI_ERR_H
An TPIE entry point was not able to properly initialize the operation management object that was pass...
Definition: err.h:69
The length of a stream on which a bit permutation was to be performed is not a power of two...
Definition: err.h:96
Value returned by a merge_management_object, telling merge() to continue to call the operate() member...
Definition: err.h:116
Value returned by a scan_object: Indicates that the scan is complete and no more input needs to be pr...
Definition: err.h:109
No error occurred.
Definition: err.h:47
Value returned by a scan_object: Indicates that the function should be called again with any "taken" ...
Definition: err.h:106
A passed object is invalid.
Definition: err.h:71
Matrix related error.
Definition: err.h:126
A low level I/O error occurred.
Definition: err.h:49
An attempt was made to call a member function of the virtual base class of tpie::ami::stream.
Definition: err.h:61
A passed object is inaccessible due to insufficient permissions.
Definition: err.h:73
Value returned by a merge_management_object, signaling that the merge() completed.
Definition: err.h:112
An environment variable necessary to initialize the TPIE accessing environment was not defined...
Definition: err.h:89
Values returned by sort routines if input does not require sorting.
Definition: err.h:129
An error occurred within the memory manager.
Definition: err.h:65
An unexpected operating system error occurred.
Definition: err.h:57
TPIE could not allocate enough intermediate streams to perform the requested operation.
Definition: err.h:86
err
Legacy TPIE error codes.
Definition: err.h:45
A bit matrix larger than the number of bits in an offset into a stream was passed.
Definition: err.h:93
An error occurred at the BTE level.
Definition: err.h:63
Value returned by a merge_management_object, telling merge() that more than one input ob ject was con...
Definition: err.h:123
An attempt was made to write to a read-only stream.
Definition: err.h:54
The memory manager could not make adequate main memory available to complete the requested operation...
Definition: err.h:79
An attempt was made to perform a matrix operation on matrices whose bounds did not match appropriatel...
Definition: err.h:99
An attempt was made to read past the end of a stream or write past the end of a substream.
Definition: err.h:52
Value returned by a merge_management_object, signaling that the last merge() call generated output fo...
Definition: err.h:119