definitions.cpp

Go to the documentation of this file.
00001 #ifndef DEFINITIONS_IMPLEMENTATION_FILE
00002 #define DEFINITIONS_IMPLEMENTATION_FILE
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : definitions                                                       *
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 "definitions.h"
00019 #include "set.cpp"
00020 
00021 #undef new  // clean up our macro before we see it here.
00022 
00023 // implement the software product function.
00024 const char *software_product_name()
00025 {
00026 #ifdef GLOBAL_PRODUCT_NAME
00027   return GLOBAL_PRODUCT_NAME;
00028 #else
00029   return "HOOPLE"; 
00030 #endif
00031 }
00032 
00033 const char *common::outcome_name(const outcome &to_name)
00034 {
00035   switch (to_name.value()) {
00036     case OKAY: return "OKAY";
00037     case NOT_IMPLEMENTED: return "NOT_IMPLEMENTED";
00038     case OUT_OF_RANGE: return "OUT_OF_RANGE";
00039     case NOT_FOUND: return "NOT_FOUND";
00040     case BAD_INPUT: return "BAD_INPUT";
00041     case BAD_TYPE: return "BAD_TYPE";
00042     case IS_FULL: return "IS_FULL";
00043     case IS_EMPTY: return "IS_EMPTY";
00044     case IS_NEW: return "IS_NEW";
00045     case EXISTING: return "EXISTING";
00046     case FAILURE: return "FAILURE";
00047     case OUT_OF_MEMORY: return "OUT_OF_MEMORY";
00048     case ACCESS_DENIED: return "ACCESS_DENIED";
00049     case IN_USE: return "IN_USE";
00050     case UNINITIALIZED: return "UNINITIALIZED";
00051     case TIMED_OUT: return "TIMED_OUT";
00052     case GARBAGE: return "GARBAGE";
00053     case NO_SPACE: return "NO_SPACE";
00054     case DISALLOWED: return "DISALLOWED";
00055     case INCOMPLETE: return "INCOMPLETE";
00056     case NO_HANDLER: return "NO_HANDLER";
00057     case NONE_READY: return "NONE_READY";
00058     case INVALID: return "INVALID";
00059     case PARTIAL: return "PARTIAL";
00060     case NO_LICENSE: return "NO_LICENSE";
00061     case UNEXPECTED: return "UNEXPECTED";
00062     case ENCRYPTION_MISMATCH: return "ENCRYPTION_MISMATCH";
00063     default: return "UNKNOWN_OUTCOME";
00064   }
00065 }
00066 
00067 int_set common::low_level_filters()
00068 {
00069   int_set lowlev_filters;
00070   for (int i = FIRST_LOW_LEVEL_FILTER; i <= LAST_LOW_LEVEL_FILTER; i++)
00071     lowlev_filters += i;
00072   return lowlev_filters;
00073 }
00074 
00075 
00076 #endif //DEFINITIONS_IMPLEMENTATION_FILE
00077 

Generated on Fri Oct 10 04:28:41 2008 for HOOPLE Libraries by  doxygen 1.5.1