MrSID Decode SDK for Raster Reference Manual
9.5.4.4709
|
Declaration of the LT_STATUS type and some commonly used status codes. More...
Go to the source code of this file.
Macros | |
Common status codes | |
#define | LT_STS_Success ((LT_STATUS)0) |
status code indicating success More... | |
#define | LT_STS_Failure ((LT_STATUS)1) |
status code indicating failure More... | |
#define | LT_STS_Uninit ((LT_STATUS)2) |
status code indicating unintialized variable More... | |
#define | LT_STS_BadParam ((LT_STATUS)3) |
status code indicating bad function parameter More... | |
#define | LT_STS_BadContext ((LT_STATUS)4) |
status code indicating bad calling context for function More... | |
#define | LT_STS_ForeignError ((LT_STATUS)5) |
status code indicating 3rd-party library error More... | |
#define | LT_STS_NotReached ((LT_STATUS)6) |
status code indicating unreachable code More... | |
#define | LT_STS_NullPointer ((LT_STATUS)7) |
status code indicating bad NULL pointer dereference More... | |
#define | LT_STS_OutOfMemory ((LT_STATUS)8) |
status code indicating new/malloc/calloc failed More... | |
#define | LT_STS_Unimplemented ((LT_STATUS)9) |
Status code indicating that the called function has not been implemented. More... | |
Macros for checking status codes | |
#define | LT_SUCCESS(err) ((err)==LT_STS_Success) |
checks return value for success status More... | |
#define | LT_FAILURE(err) ((err)!=LT_STS_Success) |
checks return value for failure status More... | |
Typedefs | |
typedef lt_uint32 | LT_STATUS |
An integral status code. More... | |
Definition in file lt_status.h.
#define LT_FAILURE | ( | err | ) | ((err)!=LT_STS_Success) |
Definition at line 148 of file lt_status.h.
#define LT_STS_BadContext ((LT_STATUS)4) |
This status code indicates that the function was called in some unexpected fashion: not that there was anything wrong with the parameters per se, it's just that the world was not set up for you to make this particular call in this particular way right now – you've violated a documented execution constraint of some sort. Examples: calling a class's member function before calling initialize(), calling decode before setting a scene or an output buffer, etc. (Contrast this with LT_STS_BadParam, which is a more specific kind of problem.)
Definition at line 94 of file lt_status.h.
#define LT_STS_BadParam ((LT_STATUS)3) |
This status code indicates that one of the parameters passed to the function was invalid, according to the documented interface rules. Examples: an integer value is out of the allowed range, or a pointer
Definition at line 79 of file lt_status.h.
#define LT_STS_Failure ((LT_STATUS)1) |
This status code indicates general, nonspecific failure. Use sparingly; project-specific codes are preferred where possible.
Definition at line 60 of file lt_status.h.
#define LT_STS_ForeignError ((LT_STATUS)5) |
This status code indicates an unknown or otherwise undiagnosable exception or error was generated by a call into a 3rd party library.
Definition at line 102 of file lt_status.h.
#define LT_STS_NotReached ((LT_STATUS)6) |
This status code is used for code that by definition should not or cannot be reached, e.g. the default case in a switch statement for which you think you've covered the full range of legal case values, where you're left with a dangling return statement. A return of LT_STS_NotReached is often preceeded by "LT_ASSERT(false)".
Definition at line 113 of file lt_status.h.
#define LT_STS_NullPointer ((LT_STATUS)7) |
This status code is used when checking a pointer to make sure that it is not NULL, prior to dereferencing it.
Definition at line 121 of file lt_status.h.
#define LT_STS_OutOfMemory ((LT_STATUS)8) |
This status code is used when allocating memory returns a NULL pointer.
Definition at line 129 of file lt_status.h.
#define LT_STS_Success ((LT_STATUS)0) |
This status code indicates the function completed sucessfully.
Definition at line 52 of file lt_status.h.
Referenced by LTIOverrideStripHeight< LTIImageFilter >::setStripHeight().
#define LT_STS_Unimplemented ((LT_STATUS)9) |
Definition at line 135 of file lt_status.h.
#define LT_STS_Uninit ((LT_STATUS)2) |
This status code is only used as a sentinal value for initializing LT_STATUS variables: it is the "-1" for status codes. A conformant function should never return this value.
Definition at line 69 of file lt_status.h.
#define LT_SUCCESS | ( | err | ) | ((err)==LT_STS_Success) |
Definition at line 146 of file lt_status.h.
This value is explicitly sized, i.e. lt_uint32 and not an "unsigned long", so it can be passed safely between pre-compiled libraries. Each LizardTech project/library is assigned ranges of values, e.g. 1000-1999, for project-specific, local usage. Values 0-100 are general, LizardTech-wide codes. Values 65000-65535 are reserved for customer use.
Definition at line 39 of file lt_status.h.
LizardTech |