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

VASTi.C File Reference

#include <dirent.h>
#include <time.h>
#include <Basics.H>
#include <VestaConfig.H>
#include <SourceOrDerived.H>
#include <ParCacheC.H>
#include <Timer.H>
#include <ReposUI.H>
#include "VASTi.H"
#include "Lex.H"
#include "Parser.H"
#include "Expr.H"
#include "Val.H"
#include "PrimRunTool.H"
#include "ToolDirectoryServer.H"
#include "Location.H"
#include "Err.H"
#include "Files.H"
#include "ApplyCache.H"
#include "ThreadData.H"

Go to the source code of this file.

Defines

#define ESUCCESS   0

Enumerations

enum  ShipKind { CopyShip, SymLinkShip }

Functions

tm * _Plocaltime_r (const time_t *timer, struct tm *result)
void PrintCacheStat (ostream *vout)
void PrintFuncTrace (ostream *vout)
void PrintErrorStack (ostream *vout)
AssocVCLookup (Val val)
int Copy (const char *fromPath, const char *toPath)
int CleanDir (Text path)
void LogShip (ShortId sid, const char *path, fstream &logFile, struct tm *shipTM, bool is_dir=false) throw ()
int ShipShortId (ShortId sid, const Text &name, ShipKind kind, fstream &logFile, struct tm *shipTM) throw ()
int ShipText (const Text &txt, const Text &name, fstream &logFile, struct tm *shipTM) throw ()
int ShipValue (Val value, ShipKind kind, struct tm *shipTM) throw ()
bool VestaShip (AssocVC *namedVal)
bool Interpret (const Text &model)
bool StartEval (const Text &filename)

Variables

const char * KindName [] = { "copy", "link" }


Define Documentation

#define ESUCCESS   0
 

Definition at line 56 of file VASTi.C.

Referenced by Copy(), and ShipShortId().


Enumeration Type Documentation

enum ShipKind
 

Enumeration values:
CopyShip 
SymLinkShip 

Definition at line 261 of file VASTi.C.


Function Documentation

struct tm* _Plocaltime_r const time_t *  timer,
struct tm *  result
 

int CleanDir Text  path  ) 
 

Definition at line 203 of file VASTi.C.

References closedir(), Error(), forceClean, hushedShipping, opendir(), and shipToPath.

Referenced by VestaShip().

int Copy const char *  fromPath,
const char *  toPath
 

Definition at line 149 of file VASTi.C.

References FdCache::close(), ESUCCESS, and FdCache::open().

bool Interpret const Text model  ) 
 

Definition at line 498 of file VASTi.C.

References ApplyModel(), cacheOption, ReposUI::canonicalize(), Text::chars(), CacheC::Checkpoint(), conInitial, Text::Empty(), Error(), ErrorCount(), VestaSource::fptag, IntToText(), CacheEntry::Indices::len, ExprC::loc, VestaSourceSRPC::Lookup, VestaConfig::failure::msg, SRPC::failure::msg, NEW, NEW_CONSTR, noLoc, OpenSource(), Parse(), parseOnly, PrintCacheStat(), printCacheStats, ValC::PrintD(), PrintErrorStack(), PrintFuncTrace(), printResult, ProcessModelHead(), psStat, Evaluator::failure::r, SRPC::failure::r, recordCallStack, shipToPath, StartEval(), theCache, ThreadDataGet(), topModelRoot, topModelSid, and VestaShip().

Referenced by StartEval().

void LogShip ShortId  sid,
const char *  path,
fstream &  logFile,
struct tm *  shipTM,
bool  is_dir = false
throw ()
 

Definition at line 266 of file VASTi.C.

Referenced by ShipShortId(), ShipText(), and ShipValue().

AssocVC* Lookup Val  val  ) 
 

Definition at line 118 of file VASTi.C.

References BindingVK, Text::cchars(), Error(), FindInContext(), IsDelimiter(), Text::Length(), NEW_CONSTR, nullAssoc, shipFromPath, Text::Sub(), AssocVC::val, and ValC::vKind.

void PrintCacheStat ostream *  vout  ) 
 

Definition at line 67 of file VASTi.C.

References appCallCounter, appHitCounter, VestaConfig::get_Text(), ParCacheC::Locate(), nModelCallCounter, nModelHitCounter, sModelCallCounter, sModelHitCounter, toolCallCounter, and toolHitCounter.

Referenced by Interpret().

void PrintErrorStack ostream *  vout  ) 
 

Definition at line 90 of file VASTi.C.

References ThreadData::callStack, SrcLoc::character, SrcLoc::file, Sequence< Elem, elem_ptrfree >::get(), SrcLoc::line, ExprC::loc, ThreadData::parent, ThreadData::parentCallStackSize, recordCallStack, Sequence< Elem, elem_ptrfree >::size(), and ThreadDataGet().

Referenced by Interpret().

void PrintFuncTrace ostream *  vout  ) 
 

Definition at line 83 of file VASTi.C.

References recordTrace, and ThreadDataGet().

Referenced by Interpret().

int ShipShortId ShortId  sid,
const Text name,
ShipKind  kind,
fstream &  logFile,
struct tm *  shipTM
throw ()
 

Definition at line 292 of file VASTi.C.

References FS::Copy(), CopyShip, Error(), ESUCCESS, hushedShipping, KindName, LogShip(), NullShortId, SourceOrDerived::shortIdToName(), and SymLinkShip.

Referenced by ShipValue().

int ShipText const Text txt,
const Text name,
fstream &  logFile,
struct tm *  shipTM
throw ()
 

Definition at line 324 of file VASTi.C.

References Error(), FdCache::flush(), hushedShipping, and LogShip().

Referenced by ShipValue().

int ShipValue Val  value,
ShipKind  kind,
struct tm *  shipTM
throw ()
 

Definition at line 348 of file VASTi.C.

References BindingVK, Text::cchars(), dotLogFiles, BindingVC::elems, Error(), FS::IsDirectory(), LogShip(), ModelVK, AssocVC::name, ListT< Value >::Null(), ListT< Value >::Pop(), ShipShortId(), ShipText(), TextVK, AssocVC::val, and ValC::vKind.

Referenced by VestaShip().

bool StartEval const Text filename  ) 
 

Definition at line 662 of file VASTi.C.

References ErrInit(), VestaConfig::get_int(), Interpret(), LexInit(), PrimInit(), PrimRunToolInit(), StartRenewLeaseThread(), ThreadDataInit(), and ValInit().

Referenced by Interpret(), and main().

bool VestaShip AssocVC namedVal  ) 
 

Definition at line 412 of file VASTi.C.

References BindingVK, Text::cchars(), CleanDir(), CopyShip, Error(), forceClean, hushedShipping, Text::Length(), ModelVK, NEW_CONSTR, shipBySymLink, shipClean, shipToPath, ShipValue(), FS::SplitPath(), SymLinkShip, and TextVK.

Referenced by Interpret().


Variable Documentation

const char* KindName[] = { "copy", "link" }
 

Definition at line 262 of file VASTi.C.

Referenced by ShipShortId().


Generated on Mon May 8 00:49:03 2006 for Vesta by  doxygen 1.4.2