Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

kira_check.C

Go to the documentation of this file.
00001 
00002        //=======================================================//    _\|/_
00003       //  __  _____           ___                    ___       //      /|\ ~
00004      //  /      |      ^     |   \  |         ^     |   \     //          _\|/_
00005     //   \__    |     / \    |___/  |        / \    |___/    //            /|\ ~
00006    //       \   |    /___\   |  \   |       /___\   |   \   // _\|/_
00007   //     ___/   |   /     \  |   \  |____  /     \  |___/  //   /|\ ~
00008  //                                                       //            _\|/_
00009 //=======================================================//              /|\ ~
00010 
00011 // kira_check.C:  Perform various miscellaneous kira checks.
00012 //
00013 // Externally visible functions:
00014 //
00015 //      bool check_kira_flag
00016 //      bool check_allowed
00017 
00018 #include "hdyn.h"
00019 
00020 bool check_kira_flag(hdyn* b, char* kira_flag)
00021 {
00022     // Return true iff the specified kira flag exists and is set to 1.
00023 
00024     if (!find_qmatch(b->get_log_story(), kira_flag)) return false;
00025     if (getiq(b->get_log_story(), kira_flag) == 1)
00026         return true;
00027     else
00028         return false;
00029 }
00030 
00031 bool check_allowed(bool allow_kira_override,
00032                    char * what_is_allowed,
00033                    bool verbose, bool& need_skip)
00034 {
00035     if (allow_kira_override) {
00036 
00037         if (verbose) {
00038             cerr << endl
00039                  << "*** Turning on " << what_is_allowed
00040                  << endl;
00041             need_skip = true;
00042         }
00043         return true;
00044 
00045     } else {
00046 
00047         if (verbose) {
00048             cerr << endl
00049                  << "*** Warning: " << what_is_allowed
00050                  << " is now turned off"
00051                  << endl;
00052             need_skip = true;
00053         }
00054     }
00055     return false;
00056 }
00057 

Generated at Sun Feb 24 09:57:06 2002 for STARLAB by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001