common_outcomes.h

Go to the documentation of this file.
00001 #ifndef COMMON_OUTCOMES_CLASS
00002 #define COMMON_OUTCOMES_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : common_outcomes                                                   *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 1991-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include "outcome.h"
00019 
00020 namespace basis {
00021 
00023 class common
00024 {
00025 public:
00027 
00029   enum outcomes {
00030     DEFINE_API_OUTCOME(OKAY, 0, "Everything is just fine"),
00031     DEFINE_API_OUTCOME(NOT_IMPLEMENTED, -1,
00032         "The invoked method is unimplemented"),
00033     DEFINE_API_OUTCOME(OUT_OF_RANGE, -2, "The value specified was out "
00034         "of bounds"),
00035     DEFINE_API_OUTCOME(NOT_FOUND, -3, "The item sought is not present"),
00036     DEFINE_API_OUTCOME(BAD_INPUT, -4, "Precondition failure--the parameters "
00037         "were inappropriate"),
00038     DEFINE_API_OUTCOME(BAD_TYPE, -5, "The objects are of incompatible types"),
00039     DEFINE_API_OUTCOME(IS_FULL, -6, "There is no room in the storage facility"),
00040     DEFINE_API_OUTCOME(IS_EMPTY, -7, "The container is empty currently"),
00041     DEFINE_API_OUTCOME(IS_NEW, -8, "The item is new"),
00042     DEFINE_API_OUTCOME(EXISTING, -9, "The item was already present"),
00043     DEFINE_API_OUTCOME(FAILURE, -10, "A failure has occurred"),
00044     DEFINE_API_OUTCOME(OUT_OF_MEMORY, -11, "There is not enough memory for the "
00045         "request according to the operating system"),
00046     DEFINE_API_OUTCOME(ACCESS_DENIED, -12, "The request was denied, possibly "
00047         "by the operating system"),
00048     DEFINE_API_OUTCOME(IN_USE, -13, "The object is already in exclusive use"),
00049     DEFINE_API_OUTCOME(UNINITIALIZED, -14, "The object has not been "
00050         "constructed properly"),
00051     DEFINE_API_OUTCOME(TIMED_OUT, -15, "The allowed time has now elapsed"),
00052     DEFINE_API_OUTCOME(GARBAGE, -16, "The request or response has been "
00053         "corrupted"),
00054     DEFINE_API_OUTCOME(NO_SPACE, -17, "A programmatic limit on storage space "
00055         "has been reached"),
00056     DEFINE_API_OUTCOME(DISALLOWED, -18, "The method denied the request"),
00057     DEFINE_API_OUTCOME(INCOMPLETE, -19, "The operation did not finish or the "
00058         "object is not completed"),
00059     DEFINE_API_OUTCOME(NO_HANDLER, -20, "The object type passed in was not "
00060         "understood by the invoked method"),
00061     DEFINE_API_OUTCOME(NONE_READY, -21, "There were no objects available"),
00062     DEFINE_API_OUTCOME(INVALID, -22, "That request or object was invalid"),
00063     DEFINE_API_OUTCOME(PARTIAL, -23, "The request was only partially finished"),
00064     DEFINE_API_OUTCOME(NO_LICENSE, -24, "The software license does not permit"
00065         "this request"),
00066     DEFINE_API_OUTCOME(UNEXPECTED, -25, "This item was unexpected, although "
00067         "not necessarily erroneous"),
00068     DEFINE_API_OUTCOME(ENCRYPTION_MISMATCH, -26, "The request failed due to a "
00069         "mismatch between encryption expected and encryption provided")
00070   };
00071 
00072   static const char *outcome_name(const outcome &to_name);
00074 
00077 }; //class.
00078 
00079 } //namespace.
00080 
00081 #endif // outer guard.
00082 
Generated on Sat Jan 28 04:22:11 2012 for hoople2 project by  doxygen 1.6.3