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

PickleC Class Reference

List of all members.

Public Member Functions

 PickleC ()
 PickleC (char *str, int sz, const PrefixTbl &prefix, const Context &c)
void PickleInt8 (Basics::int8 n)
void UnpickleInt8 (Basics::int8 &n)
void PickleInt16 (Basics::uint16 n)
void UnpickleInt16 (Basics::uint16 &n)
void PickleInt32 (Basics::uint32 n)
void UnpickleInt32 (Basics::uint32 &n)
void PickleInt (int n)
void UnpickleInt (int &n)
void PickleInt64 (Basics::uint64 n)
void UnpickleInt64 (Basics::uint64 &n)
void PickleText (const Text &t)
void UnpickleText (Text &t)
void UnpickleAtom (Atom &t)
void PickleLText (const Text &t)
void UnpickleLText (Text &t)
void PickleBool (bool v)
void UnpickleBool (bool &v)
void PickleLongId (const LongId &lid)
void UnpicklLongId (LongId &lid)
bool PickleVal (bool cut, Val value)
bool UnpickleVal (bool cut, Val &value)
const char * getBytes ()
int getSize ()
bool checkNumBytesRead ()

Public Attributes

Derived::IndicesApp dis
PrefixTbl prefix

Private Member Functions

bool PickleLocation (SrcLoc *loc)
bool UnpickleLocation (SrcLoc *&loc)
bool PickleContext (const Context &c)
bool UnpickleContext (Context &c)
void PickleDepPath (const DepPath &dp)
DepPath UnpickleDepPath ()
bool PickleDPS (DPaths *ps)
bool UnpickleDPS (DPaths *&ps)
void CollectDIs (Val value)
bool PickleExpr (Expr expr)
bool UnpickleExpr (Expr &expr)

Private Attributes

BufStreambytes
int size
int read_size
Context con
Text fileName
ShortId shortId
int linePos
TextIntTbl nameTbl

Constructor & Destructor Documentation

PickleC::PickleC  )  [inline]
 

Definition at line 44 of file Pickle.C.

References bytes, and NEW.

PickleC::PickleC char *  str,
int  sz,
const PrefixTbl prefix,
const Context c
[inline]
 

Definition at line 49 of file Pickle.C.

References bytes, and NEW_CONSTR.


Member Function Documentation

bool PickleC::checkNumBytesRead  ) 
 

Definition at line 1240 of file Pickle.C.

References bytes, Basics::mutex::lock(), outputMu, read_size, size, ThreadLabel(), and Basics::mutex::unlock().

Referenced by Unpickle().

void PickleC::CollectDIs Val  value  )  [private]
 

Definition at line 393 of file Pickle.C.

References Derived::IndicesApp::Append(), BindingVK, ClosureVK, ClosureVC::con, dis, ClosureVC::func, TextVC::HasTxt(), ListVK, ModelVK, AssocVC::name, FuncEC::name, ListT< Value >::Null(), ListT< Value >::Pop(), TextVC::Sid(), TextVK, and AssocVC::val.

Referenced by PickleVal().

const char* PickleC::getBytes  )  [inline]
 

Definition at line 106 of file Pickle.C.

References bytes, and Basics::BufStream::str().

Referenced by Pickle().

int PickleC::getSize  )  [inline]
 

Definition at line 110 of file Pickle.C.

References bytes, and size.

Referenced by Pickle().

void PickleC::PickleBool bool  v  )  [inline]
 

Definition at line 89 of file Pickle.C.

References PickleInt8().

Referenced by PickleExpr(), and PickleVal().

bool PickleC::PickleContext const Context c  )  [private]
 

Definition at line 298 of file Pickle.C.

References ListT< Value >::Length(), AssocVC::name, ListT< Value >::Null(), PickleInt16(), PickleText(), PickleVal(), ListT< Value >::Pop(), and AssocVC::val.

Referenced by PickleVal().

void PickleC::PickleDepPath const DepPath dp  )  [private]
 

Definition at line 331 of file Pickle.C.

References nameTbl, PickleInt16(), PickleInt8(), prefix, and PrefixTbl::Put().

Referenced by PickleDPS(), and PickleVal().

bool PickleC::PickleDPS DPaths ps  )  [private]
 

Definition at line 353 of file Pickle.C.

References SharedTable< K, V >::KVPair::key, SharedTable< K, V >::Iterator::Next(), PickleDepPath(), PickleInt16(), and SharedTable< K, V >::T::Size().

Referenced by PickleVal().

bool PickleC::PickleExpr Expr  expr  )  [private]
 

Definition at line 438 of file Pickle.C.

References ApplyEK, ApplyOpEK, ApplyUnOpEK, ArgListEK, ApplyEC::args, FuncEC::args, AssignEK, BlockEC::assocs, SelectEC::bang, BindEK, SelectEC::binding, BindingEK, ModelEC::block, BlockEK, IterateEC::body, BlockEC::body, FuncEC::body, ComputedEK, ConstantEK, IterateEC::control, IterateEC::e, ApplyUnOpEC::e, ApplyOpEC::e1, ApplyOpEC::e2, IfEC::els, ErrorEK, ExprListEK, SelectEC::field, FileEK, ModelEC::files, PairEC::first, ApplyEC::func, FuncEK, Sequence< Elem, elem_ptrfree >::get(), NameEC::id, IfEK, FileEC::import, ModelEC::imports, AssignEC::isFunc, BlockEC::isReturn, IterateEK, ExprC::kind, BindEC::lhs, AssignEC::lhs, ListEK, ExprC::loc, FileEC::localPath, VestaSource::longid, ModelEK, FileEC::modelRoot, ModelEC::modelRoot, FuncEC::name, PrimitiveEC::name, FileEC::name, NameEK, FuncEC::noCache, ApplyUnOpEC::op, ApplyOpEC::op, PairEK, PickleBool(), PickleInt16(), PickleInt64(), PickleInt8(), PickleLocation(), PickleLongId(), PickleText(), PickleVal(), PrimitiveEK, BindEC::rhs, AssignEC::rhs, PairEC::second, SelectEK, Sequence< Elem, elem_ptrfree >::size(), StmtListEK, IfEC::test, and IfEC::then.

Referenced by PickleVal().

void PickleC::PickleInt int  n  )  [inline]
 

Definition at line 65 of file Pickle.C.

References PickleInt32().

Referenced by Pickle(), and PickleVal().

void PickleC::PickleInt16 Basics::uint16  n  ) 
 

Definition at line 152 of file Pickle.C.

References bytes, Basics::hton16(), size, sizeof_assert, and FS::Write().

Referenced by PickleContext(), PickleDepPath(), PickleDPS(), PickleExpr(), PickleText(), and PickleVal().

void PickleC::PickleInt32 Basics::uint32  n  ) 
 

Definition at line 159 of file Pickle.C.

References bytes, Basics::hton32(), size, sizeof_assert, and FS::Write().

Referenced by PickleInt(), PickleLText(), and PickleVal().

void PickleC::PickleInt64 Basics::uint64  n  ) 
 

Definition at line 166 of file Pickle.C.

References bytes, Basics::hton64(), size, sizeof_assert, and FS::Write().

Referenced by PickleExpr().

void PickleC::PickleInt8 Basics::int8  n  ) 
 

Definition at line 146 of file Pickle.C.

References bytes, size, sizeof_assert, and FS::Write().

Referenced by PickleBool(), PickleDepPath(), PickleExpr(), PickleLocation(), and PickleVal().

bool PickleC::PickleLocation SrcLoc loc  )  [private]
 

Definition at line 272 of file Pickle.C.

References SrcLoc::character, SrcLoc::line, linePos, and PickleInt8().

Referenced by PickleExpr().

void PickleC::PickleLongId const LongId lid  ) 
 

Definition at line 260 of file Pickle.C.

References bytes, size, sizeof_assert, LongId::value, and FS::Write().

Referenced by PickleExpr().

void PickleC::PickleLText const Text t  ) 
 

Definition at line 238 of file Pickle.C.

References bytes, Text::chars(), Text::Length(), PickleInt32(), size, and FS::Write().

Referenced by PickleVal().

void PickleC::PickleText const Text t  ) 
 

Definition at line 203 of file Pickle.C.

References bytes, Text::chars(), Text::Length(), PickleInt16(), size, and FS::Write().

Referenced by PickleContext(), PickleExpr(), and PickleVal().

bool PickleC::PickleVal bool  cut,
Val  value
 

Definition at line 892 of file Pickle.C.

References Derived::IndicesApp::Append(), BindingVK, BooleanVK, FP::ByteCnt, bytes, ValC::cacheit, ClosureVK, CollectDIs(), ClosureVC::con, ModelVC::content, dis, BindingVC::elems, ListVC::elems, Error(), ErrorVK, SrcLoc::file, ModelVC::FingerPrint(), TextVC::FingerPrint(), ModelVC::FingerPrintFile(), ClosureVC::func, TextVC::HasSid(), TextVC::HasTxt(), IntegerVK, BindingVC::lenDps, ListVC::lenDps, TextVC::Length(), ListT< Value >::Length(), SrcLoc::line, linePos, ListVK, ExprC::loc, Basics::mutex::lock(), ModelVK, FuncEC::name, AssocVC::name, TextVC::NDS(), ListT< Value >::Null(), outputMu, ValC::path, PickleBool(), PickleContext(), PickleDepPath(), PickleDPS(), PickleExpr(), PickleInt(), PickleInt16(), PickleInt32(), PickleInt8(), PickleLText(), PickleText(), ListT< Value >::Pop(), PrimitiveVK, SrcLoc::shortId, TextVC::Sid(), size, Snip(), TextVK, TextVC::TName(), Basics::mutex::unlock(), and AssocVC::val.

Referenced by Pickle(), PickleContext(), and PickleExpr().

void PickleC::UnpickleAtom Atom t  ) 
 

Definition at line 225 of file Pickle.C.

References bytes, NEW_PTRFREE_ARRAY, FS::Read(), read_size, size, and UnpickleInt16().

Referenced by UnpickleContext(), and UnpickleVal().

void PickleC::UnpickleBool bool &  v  )  [inline]
 

Definition at line 90 of file Pickle.C.

References UnpickleInt8().

Referenced by UnpickleExpr(), and UnpickleVal().

bool PickleC::UnpickleContext Context c  )  [private]
 

Definition at line 317 of file Pickle.C.

References ListT< Value >::Append1D(), NEW_CONSTR, UnpickleAtom(), UnpickleInt16(), and UnpickleVal().

Referenced by UnpickleVal().

DepPath PickleC::UnpickleDepPath  )  [private]
 

Definition at line 341 of file Pickle.C.

References PrefixTbl::Get(), prefix, UnpickleInt16(), and UnpickleInt8().

Referenced by UnpickleDPS(), and UnpickleVal().

bool PickleC::UnpickleDPS DPaths *&  ps  )  [private]
 

Definition at line 377 of file Pickle.C.

References LookupPath(), NEW_CONSTR, SharedTable< K, V >::T::Put(), UnpickleDepPath(), and UnpickleInt16().

Referenced by UnpickleVal().

bool PickleC::UnpickleExpr Expr expr  )  [private]
 

Definition at line 642 of file Pickle.C.

References BindingEC::AddExpr(), ListEC::AddExpr(), StmtListEC::AddExpr(), ArgListEC::AddExpr(), ExprListEC::AddExpr(), ApplyEK, ApplyOpEK, ApplyUnOpEK, ArgListEK, AssignEK, BindEK, BindingEK, BlockEK, ComputedEK, ConstantEK, ErrorEK, ExprListEK, FileEK, FuncEK, IfEK, ArgListEC::inPKs, IterateEK, ListEK, LongId::lookup(), LookupPrim(), ModelEK, NameEK, NEW_CONSTR, PairEK, PrimitiveEK, SelectEK, StmtListEK, test(), UnpickleBool(), UnpickleInt16(), UnpickleInt64(), UnpickleInt8(), UnpickleLocation(), UnpickleText(), UnpickleVal(), and UnpicklLongId().

Referenced by UnpickleVal().

void PickleC::UnpickleInt int &  n  )  [inline]
 

Definition at line 66 of file Pickle.C.

References UnpickleInt32().

Referenced by Unpickle(), and UnpickleVal().

void PickleC::UnpickleInt16 Basics::uint16 n  ) 
 

Definition at line 179 of file Pickle.C.

References bytes, Basics::ntoh16(), FS::Read(), read_size, and sizeof_assert.

Referenced by UnpickleAtom(), UnpickleContext(), UnpickleDepPath(), UnpickleDPS(), UnpickleExpr(), UnpickleText(), and UnpickleVal().

void PickleC::UnpickleInt32 Basics::uint32 n  ) 
 

Definition at line 187 of file Pickle.C.

References bytes, Basics::ntoh32(), FS::Read(), read_size, and sizeof_assert.

Referenced by UnpickleInt(), UnpickleLText(), and UnpickleVal().

void PickleC::UnpickleInt64 Basics::uint64 &  n  ) 
 

Definition at line 195 of file Pickle.C.

References bytes, Basics::ntoh64(), FS::Read(), read_size, and sizeof_assert.

Referenced by UnpickleExpr().

void PickleC::UnpickleInt8 Basics::int8 n  ) 
 

Definition at line 173 of file Pickle.C.

References bytes, FS::Read(), read_size, and sizeof_assert.

Referenced by UnpickleBool(), UnpickleDepPath(), UnpickleExpr(), UnpickleLocation(), and UnpickleVal().

bool PickleC::UnpickleLocation SrcLoc *&  loc  )  [private]
 

Definition at line 285 of file Pickle.C.

References fileName, linePos, NEW_CONSTR, shortId, and UnpickleInt8().

Referenced by UnpickleExpr().

void PickleC::UnpickleLText Text t  ) 
 

Definition at line 247 of file Pickle.C.

References bytes, NEW_PTRFREE_ARRAY, FS::Read(), read_size, size, and UnpickleInt32().

Referenced by UnpickleVal().

void PickleC::UnpickleText Text t  ) 
 

Definition at line 212 of file Pickle.C.

References bytes, NEW_PTRFREE_ARRAY, FS::Read(), read_size, size, and UnpickleInt16().

Referenced by UnpickleExpr(), and UnpickleVal().

bool PickleC::UnpickleVal bool  cut,
Val value
 

Definition at line 1061 of file Pickle.C.

References ListT< Value >::Append1D(), BindingVK, BooleanVK, FP::ByteCnt, bytes, ClosureVK, con, ValC::Copy(), ValC::dps, Error(), ErrorVK, fileName, VestaSource::fptag, LongId::fromShortId(), VestaSource::immutableDirectory, IntegerVK, linePos, ListVK, Basics::mutex::lock(), VestaSource::longid, LookupPath(), LookupPrim(), ModelVK, NEW_CONSTR, outputMu, ValC::path, PrimitiveVK, FP::Tag::Read(), read_size, shortId, TextVK, VestaSource::type, Basics::mutex::unlock(), UnpickleAtom(), UnpickleBool(), UnpickleContext(), UnpickleDepPath(), UnpickleDPS(), UnpickleExpr(), UnpickleInt(), UnpickleInt16(), UnpickleInt32(), UnpickleInt8(), UnpickleLText(), and UnpickleText().

Referenced by Unpickle(), UnpickleContext(), and UnpickleExpr().

void PickleC::UnpicklLongId LongId lid  ) 
 

Definition at line 266 of file Pickle.C.

References bytes, FS::Read(), read_size, sizeof_assert, and LongId::value.

Referenced by UnpickleExpr().


Member Data Documentation

BufStream* PickleC::bytes [private]
 

Definition at line 120 of file Pickle.C.

Referenced by checkNumBytesRead(), getBytes(), getSize(), PickleC(), PickleInt16(), PickleInt32(), PickleInt64(), PickleInt8(), PickleLongId(), PickleLText(), PickleText(), PickleVal(), UnpickleAtom(), UnpickleInt16(), UnpickleInt32(), UnpickleInt64(), UnpickleInt8(), UnpickleLText(), UnpickleText(), UnpickleVal(), and UnpicklLongId().

Context PickleC::con [private]
 

Definition at line 122 of file Pickle.C.

Referenced by UnpickleVal().

Derived::IndicesApp PickleC::dis
 

Definition at line 102 of file Pickle.C.

Referenced by CollectDIs(), Pickle(), and PickleVal().

Text PickleC::fileName [private]
 

Definition at line 123 of file Pickle.C.

Referenced by UnpickleLocation(), and UnpickleVal().

int PickleC::linePos [private]
 

Definition at line 125 of file Pickle.C.

Referenced by PickleLocation(), PickleVal(), UnpickleLocation(), and UnpickleVal().

TextIntTbl PickleC::nameTbl [private]
 

Definition at line 126 of file Pickle.C.

Referenced by PickleDepPath().

PrefixTbl PickleC::prefix
 

Definition at line 103 of file Pickle.C.

Referenced by Pickle(), PickleDepPath(), and UnpickleDepPath().

int PickleC::read_size [private]
 

Definition at line 121 of file Pickle.C.

Referenced by checkNumBytesRead(), UnpickleAtom(), UnpickleInt16(), UnpickleInt32(), UnpickleInt64(), UnpickleInt8(), UnpickleLText(), UnpickleText(), UnpickleVal(), and UnpicklLongId().

ShortId PickleC::shortId [private]
 

Definition at line 124 of file Pickle.C.

Referenced by UnpickleLocation(), and UnpickleVal().

int PickleC::size [private]
 

Definition at line 121 of file Pickle.C.

Referenced by checkNumBytesRead(), getSize(), PickleInt16(), PickleInt32(), PickleInt64(), PickleInt8(), PickleLongId(), PickleLText(), PickleText(), PickleVal(), UnpickleAtom(), UnpickleLText(), and UnpickleText().


The documentation for this class was generated from the following file:
Generated on Mon May 8 00:49:11 2006 for Vesta by  doxygen 1.4.2