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

Text Class Reference

#include <Text.H>

Inheritance diagram for Text:

Atom FV::T StatError::BadMPKFile StatError::EndOfFile StatError::UnevenLevels List of all members.

Public Types

enum  { MaxInt = (int)(~(1u << ((sizeof(int) * 8) - 1))) }

Public Member Functions

 Text () throw ()
 Text (const Text &t) throw ()
 Text (const char c) throw ()
 Text (const char *str, void *copy=NULL) throw ()
 Text (const char *bytes, int len) throw ()
 Text (const std::string &str) throw ()
void Init (const char *str)
 ~Text () throw ()
Textoperator= (const char *str) throw ()
Textoperator= (const Text &t) throw ()
Textoperator+= (const char *str) throw ()
Textoperator+= (const Text &t) throw ()
const char * cchars () const throw ()
char * chars () const throw ()
char operator[] (int i) const throw ()
int Length () const throw ()
bool Empty () const throw ()
Text Sub (int start, int len=MaxInt) const throw ()
int FindChar (char c, int start=0) const throw ()
int FindCharR (char c, int start=MaxInt) const throw ()
int FindText (const Text &substr, int start=0) const throw ()
Word Hash () const throw ()
Text WordWrap (const Text &prefix="", unsigned int columns=70) const throw ()
Text PadLeft (unsigned int toLen, const Text &padding=" ") const throw ()
Text PadRight (unsigned int toLen, const Text &padding=" ") const throw ()

Static Public Member Functions

static bool GCImpl () throw ()

Protected Attributes

const char * s

Friends

bool operator== (const Text &t1, const Text &t2) throw ()
bool operator!= (const Text &t1, const Text &t2) throw ()
bool operator< (const Text &t1, const Text &t2) throw ()
bool operator<= (const Text &t1, const Text &t2) throw ()
bool operator> (const Text &t1, const Text &t2) throw ()
bool operator>= (const Text &t1, const Text &t2) throw ()
Text operator+ (const Text &t1, const Text &t2) throw ()
Text operator+ (const char *str, const Text &t) throw ()
Text operator+ (const Text &t, const char *str) throw ()
std::ostream & operator<< (std::ostream &os, const Text &t) throw ()

Member Enumeration Documentation

anonymous enum
 

Enumeration values:
MaxInt 

Definition at line 107 of file Text.H.


Constructor & Destructor Documentation

Text::Text  )  throw ()
 

Definition at line 55 of file TextCommon.C.

References s.

Text::Text const Text t  )  throw ()
 

Definition at line 65 of file TextGC.C.

Text::Text const char  c  )  throw ()
 

Definition at line 73 of file TextGC.C.

References NEW_PTRFREE_ARRAY.

Text::Text const char *  str,
void *  copy = NULL
throw ()
 

Definition at line 60 of file TextCommon.C.

Text::Text const char *  bytes,
int  len
throw ()
 

Definition at line 65 of file TextCommon.C.

Text::Text const std::string &  str  )  throw ()
 

Definition at line 70 of file TextCommon.C.

Text::~Text  )  throw ()
 

Definition at line 88 of file TextGC.C.


Member Function Documentation

const char* Text::cchars  )  const throw () [inline]
 

Definition at line 96 of file Text.H.

References s.

Referenced by AccessControl_commonInit_inner(), AcquireMastership(), Source_Interval::as_fname(), Source_Interval::as_text(), AtomInit::AtomInit(), Canonical(), VestaSource::cedeMastership(), VestaLog::checkpointAbort(), VestaLog::checkpointBegin(), VestaLog::checkpointEnd(), VestaLog::checkpointResume(), CacheS::CommitChkpt(), coutHistoryCallback(), VDirSurrogate::createVolatileDirectory(), DeleteAllShortIdsBut(), do_mkdir(), do_readlink(), do_statfs(), DoDeletions(), InsertAppendableDirectoryStep::execute(), ReposUI::filenameToVS(), fix_work_dir_attrib(), FS::TempFname(), FV2::T::ToStr(), Time_Ranges::gen_plot(), PrefixTbl::GetString(), AccessControl::GlobalIdentityRep::GlobalIdentityRep(), GlueInit(), TCP_sock::init(), RunTool::init(), VMemPool::init(), listFromText(), SRPC::local_socket(), VDirEvaluator::lookup(), Lookup(), ReposUI::lookupCreatePath(), LookupPath(), main(), MainModel(), SMultiPKFile::MakeDirs(), Basics::RegExp::match(), VestaLog::nextLog(), nfsd_init(), VestaLog::open(), VestaLog::openCheckpoint(), OpenSource(), Basics::RegExp::operator()(), OS::getGrNam(), ParseImports::RemoteModelSpace::getType(), ParseImports::RemoteModelSpace::open(), Time_Ranges::print(), Lock_Data::print_lock_info(), Basics::RegExp::RegExp(), SRPC::remote_socket(), report_location(), RunToolHost(), RunToolServerInit(), S_Cat2(), S_Catna(), S_CatnT(), AccessControl::serverInit(), ShipValue(), ShortIdServerExport(), ShortIdBlock::shortIdToName(), SourceOrDerived_initMRLN(), FV2::T::T(), TextStartTime(), ReposUI::uniquify(), VDirSurrogate_init(), vectorFromText(), VestaConfig::get_bool(), VestaShip(), VestaSourceFailure(), VestaSourceReceptionist(), VestaSourceServerExport(), and xlate_errno().

char* Text::chars  )  const throw () [inline]
 

Definition at line 97 of file Text.H.

References s.

Referenced by AddToNewStuff(), ArcInt(), CacheS::CleanCacheLog(), convert_failure(), CreateRootForDeriveds(), EmptyPKLog::EmptyPKLog(), ReposUI::getMessage(), Interpret(), main(), SMultiPKFile::OpenAtomicWrite(), PickleC::PickleLText(), PickleC::PickleText(), print_connection(), PrintCacheLog(), Recover(), CacheS::RecoverCacheLog(), CacheS::RecoverCILog(), CacheS::RecoverGraphLog(), CacheS::RecoverWeededMPKs(), RunTool(), RunToolServerInit(), ReposRoots::Scan(), Weeder::ScanLogOnce(), CacheS::SetMPKsToWeed(), CacheS::SetStableDeleting(), TextVC::TextC::TextC(), SRPC_impl::throw_failure(), VestaConfig::get_bool(), VestaConfig::get_float(), VestaConfig::get_int(), CacheS::WriteHitFilter(), Weeder::WriteMiscVars(), and Weeder::WriteWeeded().

bool Text::Empty  )  const throw () [inline]
 

Definition at line 118 of file Text.H.

References s.

Referenced by AcquireMastership(), Assign(), Bind1(), ReposUI::canonicalize(), VestaSource::cedeMastership(), VDirSurrogate::createVolatileDirectory(), Defined(), do_mkdir(), dump_import_id(), BindingEC::Eval(), InsertAppendableDirectoryStep::execute(), Char_Buff::first(), ReposUI::getMessage(), Interpret(), Char_Buff::length(), Lookup(), LookupPath(), main(), MastershipInit1(), ModelPath(), Char_Buff::operator!=(), operator<<(), Char_Buff::operator==(), Char_Buff::pop(), Recover(), TextUptime(), ToolCommandLineAsText(), VestaSourceSRPC::Start(), and VestaSourceSRPC_init_inner().

int Text::FindChar char  c,
int  start = 0
const throw ()
 

Definition at line 99 of file TextCommon.C.

References Length(), and max().

Referenced by ReposUI::filenameToVS(), HTMLQuote(), main(), MastershipInit1(), and VestaSourceSRPC_init_inner().

int Text::FindCharR char  c,
int  start = MaxInt
const throw ()
 

Definition at line 108 of file TextCommon.C.

References Length(), and min().

Referenced by commandLineParsing(), SMultiPKFile::DeleteFile(), FS::RemoveSpecialArcs(), ReposUI::getMasterHintDir(), main(), and SRPC::split_name().

int Text::FindText const Text substr,
int  start = 0
const throw ()
 

Definition at line 117 of file TextCommon.C.

References Length(), and max().

Referenced by Error(), and main().

bool Text::GCImpl  )  throw () [static]
 

Definition at line 31 of file TextGC.C.

Referenced by Atom::Atom(), and Atom::operator=().

Word Text::Hash  )  const throw ()
 

Definition at line 166 of file TextCommon.C.

References max(), RotateWord(), and s.

Referenced by Source_Interval::Hash(), and TestHash().

void Text::Init const char *  str  )  [inline]
 

Definition at line 57 of file Text.H.

References s.

int Text::Length  )  const throw () [inline]
 

Definition at line 115 of file Text.H.

Referenced by Canonical(), VestaSource::cedeMastership(), ReposUI::cleanup(), CacheS::CommitChkpt(), SMultiPKFile::DeleteFile(), doit(), FileEC::Eval(), Find(), FindR(), FV2::T::ToStr(), FV::List::Size(), ReposUI::getMessage(), PrefixTbl::GetString(), AccessControl::GlobalIdentityRep::GlobalIdentityRep(), HTMLQuote(), Char_Buff::length(), TextVC::Length(), Lookup(), LookupPath(), main(), MainModel(), SMultiPKFile::MakeDirs(), MastershipInit1(), PrefixTbl::MemorySize(), ModelPath(), GatherWeedRoots::P(), PadLeft(), PadRight(), ParseImports::ResolvePath(), PickleC::PickleLText(), PickleC::PickleText(), Char_Buff::pop(), AssocVC::PrintD(), Process(), ReposRoots::Scan(), setSuffix(), TextVC::Sid(), SplitPath(), stripPrefix(), TextVC::TextC::TextC(), SRPC_impl::throw_failure(), VestaShip(), RecursiveStats::visit(), ReposUI::vsToFilename(), vsToFilename(), and WordWrap().

Text & Text::operator+= const Text t  )  throw ()
 

Reimplemented in Atom.

Definition at line 151 of file TextGC.C.

Text & Text::operator+= const char *  str  )  throw ()
 

Reimplemented in Atom.

Definition at line 145 of file TextGC.C.

Text & Text::operator= const Text t  )  throw ()
 

Reimplemented in Atom.

Definition at line 97 of file TextGC.C.

Text & Text::operator= const char *  str  )  throw ()
 

Reimplemented in Atom.

Definition at line 91 of file TextGC.C.

char Text::operator[] int  i  )  const throw () [inline]
 

Definition at line 111 of file Text.H.

References s.

Text Text::PadLeft unsigned int  toLen,
const Text padding = " "
const throw ()
 

Definition at line 370 of file TextCommon.C.

References Length(), and s.

Referenced by TestPad().

Text Text::PadRight unsigned int  toLen,
const Text padding = " "
const throw ()
 

Definition at line 389 of file TextCommon.C.

References Length(), and s.

Text Text::Sub int  start,
int  len = MaxInt
const throw ()
 

Definition at line 75 of file TextCommon.C.

References Length(), NEW_PTRFREE_ARRAY, and s.

Referenced by commandLineParsing(), CacheS::CommitChkpt(), SMultiPKFile::DeleteFile(), Error(), ReposUI::filenameToVS(), FS::RemoveSpecialArcs(), ReposUI::getMasterHintDir(), HTMLQuote(), Lookup(), ReposUI::lookupCreatePath(), LookupPath(), main(), ModelPath(), ParseImports::P(), ParseImports::ResolvePath(), Char_Buff::pop(), ReplicateMissing(), SRPC::split_name(), SplitPath(), stripPrefix(), Sub(), VestaSourceSRPC::Start(), RecursiveStats::visit(), ReposUI::vsToFilename(), and vsToFilename().

Text Text::WordWrap const Text prefix = "",
unsigned int  columns = 70
const throw ()
 

Definition at line 286 of file TextCommon.C.

References Length().


Friends And Related Function Documentation

bool operator!= const Text t1,
const Text t2
throw () [friend]
 

Definition at line 116 of file TextGC.C.

Text operator+ const Text t,
const char *  str
throw () [friend]
 

Definition at line 139 of file TextGC.C.

Text operator+ const char *  str,
const Text t
throw () [friend]
 

Definition at line 134 of file TextGC.C.

Text operator+ const Text t1,
const Text t2
throw () [friend]
 

Definition at line 129 of file TextGC.C.

bool operator< const Text t1,
const Text t2
throw () [friend]
 

Definition at line 74 of file Text.H.

std::ostream& operator<< std::ostream &  os,
const Text t
throw () [friend]
 

Definition at line 102 of file Text.H.

bool operator<= const Text t1,
const Text t2
throw () [friend]
 

Definition at line 76 of file Text.H.

bool operator== const Text t1,
const Text t2
throw () [friend]
 

Definition at line 104 of file TextGC.C.

bool operator> const Text t1,
const Text t2
throw () [friend]
 

Definition at line 78 of file Text.H.

bool operator>= const Text t1,
const Text t2
throw () [friend]
 

Definition at line 80 of file Text.H.


Member Data Documentation

const char* Text::s [protected]
 

Definition at line 172 of file Text.H.

Referenced by Atom::Atom(), cchars(), chars(), Empty(), Hash(), Atom::Init(), Init(), operator[](), PadLeft(), PadRight(), FV::T::Recv(), Sub(), and Text().


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