Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

EvalBasics.H

Go to the documentation of this file.
00001 // Copyright (C) 2001, Compaq Computer Corporation
00002 // 
00003 // This file is part of Vesta.
00004 // 
00005 // Vesta is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 // 
00010 // Vesta is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with Vesta; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 // File: EvalBasics.H
00020 
00021 // This header file contains definitions that are closely connected
00022 // to the language definition.
00023 
00024 #ifndef EvalBasics_H
00025 #define EvalBasics_H
00026 
00027 #include "ValExpr.H"
00028 #include <Basics.H>
00029 #include <CacheIndex.H>
00030 #include <CacheC.H>
00031 #include <VestaSource.H>
00032 
00033 class Evaluator {
00034 public:
00035   class failure {
00036   public:
00037     Text msg;
00038     bool r;
00039     inline failure(const Text &msg, bool r)
00040       { this->msg = msg; this->r = r; };
00041     inline failure(const failure &f) 
00042       { this->msg = f.msg; this->r = f.r; };
00043     inline failure& operator=(const failure &f) {
00044       this->msg = f.msg; this->r = f.r; return *this; };
00045   };
00046 };
00047 
00048 // Globals for command line. Set once at the start of an evaluation.
00049 // No need to protect by mutex.
00050 extern bool parseOnly, noAddEntry, fsDeps, evalCalls, stopOnError,
00051             psStat, shipBySymLink, shipClean, forceClean, diagnose,
00052             hushedShipping, pauseBeforeTool, pauseAfterTool,
00053             pauseAfterToolSignal, pauseAfterToolError, autoRepl, dotLogFiles;
00054 extern Text shipToPath, shipFromPath;
00055 
00056 // Globals for the cache. Set once at the start of an evaluation.
00057 // No need to protect by mutex.
00058 extern CacheC *theCache;
00059 extern time_t leaseDuration;
00060 extern int cacheOption, maxThreads;
00061 
00062 // Globals counters. Protected by counterMu.
00063 extern int toolCallCounter, toolHitCounter, appCallCounter, appHitCounter,
00064            sModelCallCounter, sModelHitCounter, nModelCallCounter, 
00065            nModelHitCounter;
00066 
00067 // The threshold to determine whether to fingerprint file content.
00068 // Set once at the start of an evaluation. No need to protect by mutex.
00069 extern IntegerVC *fpContent;
00070 
00071 // Globals for the interface name of tool directory server:
00072 extern Text toolDirServerIntfName;
00073 
00074 // Globals for the top-level model. Set once at the start of an
00075 // evaluation. No need to protect by mutex.
00076 extern VestaSource *topModelRoot;
00077 extern ShortId topModelSid;
00078 
00079 // Globals for diagnostic I/O:
00080 extern bool recordTrace;
00081 extern bool recordCallStack;
00082 extern bool printVersion;
00083 extern bool printResult;
00084 extern bool printCacheStats;
00085 extern bool printSidNum;
00086 
00087 // Mutex to protect callStackPrinted and workers' call stacks.
00088 static Basics::mutex callStackMu;
00089 
00090 // Global for creating deriveds.
00091 extern VestaSource *rootForDeriveds;
00092 
00093 // Character string manipulation (char * and Text)
00094 extern const Text emptyText;
00095 
00096 // Conversion between integer and arc.
00097 Text IntToText(int n);
00098 Text IntArc(int n);
00099 int ArcInt(const Text& t);
00100 int IncCounter(int* counter);
00101 
00102 #endif  // EvalBasics_H

Generated on Mon May 8 00:48:37 2006 for Vesta by  doxygen 1.4.2