MrSID Decode SDK for Raster Reference Manual  9.0.0.3864
lt_utilStatusData.h
Go to the documentation of this file.
00001 /* $Id$ */
00002 /* //////////////////////////////////////////////////////////////////////////
00003 //                                                                         //
00004 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue,   //
00005 // Suite 200, Seattle, WA 98104.  Unauthorized use or distribution         //
00006 // prohibited.  Access to and use of this code is permitted only under     //
00007 // license from LizardTech, Inc.  Portions of the code are protected by    //
00008 // US and foreign patents and other filings. All Rights Reserved.          //
00009 //                                                                         //
00011 /* PUBLIC */
00012 
00013 #ifndef LT_UTILSTATUSDATA_H
00014 #define LT_UTILSTATUSDATA_H
00015 
00016 // lt_lib_base
00017 #include "lt_base.h"
00018 
00019 // system
00020 #include <stdlib.h>
00021 
00022 
00023 #if defined(LT_COMPILER_MS)
00024    #pragma warning(push,4) 
00025 #endif
00026 
00027 
00028 LT_BEGIN_NAMESPACE(LizardTech)
00029 
00030 class LTFileSpec;
00031 
00032 
00096 class LTUtilStatusData
00097 {
00098 public:
00109    static LT_STATUS initialize();
00110 
00119    static LT_STATUS terminate();
00120 
00121    // returns true iff initialize() was called, e.g. system is being used
00122    static bool isActive();
00123 
00124    // push data associated with an error onto the error frame stack
00125    // do begin(), data..., end()
00126    static void pushBegin(LT_STATUS status);
00127    static void pushContext(LT_STATUS status, const char *context);
00128    static void pushUint32(lt_uint32 value);
00129    static void pushInt32(lt_int32 value);
00130    static void pushString(const char *value);
00131    static void pushDouble(double value);
00132    static void pushFileSpec(const LTFileSpec &value);
00133    static void pushEnd();
00134 
00135    // get the top data item off the error frame stack
00136    // returns failure if the data itemis not of the specified type
00137    static LT_STATUS popBegin(LT_STATUS &status);
00138    static LT_STATUS popContext(const char *&context);
00139    static LT_STATUS popString(char *&value);         // caller takes ownership of string
00140    static LT_STATUS popEnd();
00141 
00142    // remove the current error frame, if any (this is like doing the pop
00143    // begin/end sequence, if there is an active frame)
00144    static void clear();
00145 };
00146 
00147 
00148 LT_END_NAMESPACE(LizardTech)
00149 
00150 #if defined(LT_COMPILER_MS)
00151    #pragma warning(pop) 
00152 #endif
00153 
00154 #endif // LT_UTILSTATUSDATA_H