EDoc::FunctionLoc Class Reference

#include <include/EDoc/FunctionLoc.h>

Inheritance diagram for EDoc::FunctionLoc:

EDoc::DictionarySpecific

Detailed Description

Is a conglomerate of a reference to a Function object and a Location in a source file.

This can be used for a few purposes one of which is to store data for a function call. This way the function that is being called is stored along with the location in the source code from which the call is made for debugging purposes.

Definition at line 42 of file FunctionLoc.h.

Public Member Functions

 FunctionLoc (Dictionary &dict_in, Function *value_in, const Location &loc_in)
 Create a new FunctionLoc given the dictionary, a function to reference and the location.
 FunctionLoc (Dictionary *dict_in=NULL)
 See CodeBlock::CodeBlock(Dictionary* dict_in=NULL).
 FunctionLoc (const FunctionLoc &right)
 See CodeBlock::CodeBlock(const CodeBlock& right).
 FunctionLoc (const FunctionLoc &right, Dictionary &dict_in)
 See CodeBlock::CodeBlock(const CodeBlock& right, Dictionary& dict_in).
FunctionLocoperator= (const FunctionLoc &right)
 See CodeBlock::operator=().
void Read (PersistenceIFace &file, IndexedDictionary &idict)
 See CodeBlock::Read().
void Write (PersistenceIFace &file) const
 See CodeBlock::Write().
virtual size_t ReplaceReferences (PStack &stack, void *remove, void *replace)
 See DictionarySpecific::ReplaceReferences().
virtual std::ostream & Print (std::ostream &out, std::string prefix="") const
 See DictionarySpecific::Print().
virtual void Validate (PStack &stack, const Dictionary &dict_in) const
 See DictionarySpecific::Validate().
bool operator== (const FunctionLoc &right) const
 Equivilance operator (Works across dictionaries).
bool operator< (const FunctionLoc &right) const
 Less than comparison so this can be used for std::map keys.
std::string ToString (std::string prefix="") const
 Returns a string representing the current object in a user readable manner.

Data Fields

Location loc
 A location in a source file.
Functionvalue
 A reference to a Function.
bool possible
 When this object respresents a function call, then this flag is true if the call is a "possible" call and not an explicit call.
bool is_top_level
 USED ONLY FROM Dictionary::CalculatePropogatingExceptions().

Protected Attributes

Dictionarydict
 A reference to the dictionary this object belongs to.


Constructor & Destructor Documentation

EDoc::FunctionLoc::FunctionLoc ( EDoc::Dictionary dict_in,
EDoc::Function value_in,
const Location loc_in 
)

Create a new FunctionLoc given the dictionary, a function to reference and the location.

Note:
EDoc++ data included.

Definition at line 34 of file FunctionLoc.cpp.

References EDoc::DictionarySpecific::dict, EDOC_ASSERT, EDoc::Dictionary::functions, EDoc::StringIdentifiedObject::GetKeyName(), and value.

EDoc::FunctionLoc::FunctionLoc ( EDoc::Dictionary dict_in = NULL  ) 

See CodeBlock::CodeBlock(Dictionary* dict_in=NULL).

Note:
EDoc++ data included.

Definition at line 46 of file FunctionLoc.cpp.

EDoc::FunctionLoc::FunctionLoc ( const FunctionLoc right  ) 

See CodeBlock::CodeBlock(const CodeBlock& right).

Note:
EDoc++ data included.

Definition at line 55 of file FunctionLoc.cpp.

EDoc::FunctionLoc::FunctionLoc ( const FunctionLoc right,
EDoc::Dictionary dict_in 
)

See CodeBlock::CodeBlock(const CodeBlock& right, Dictionary& dict_in).

Note:
EDoc++ data included.

Definition at line 64 of file FunctionLoc.cpp.

References EDoc::DictionarySpecific::dict, EDoc::Dictionary::functions, and value.


Member Function Documentation

EDoc::FunctionLoc::operator= ( const FunctionLoc right  ) 

See CodeBlock::operator=().

Note:
EDoc++ data included.

Definition at line 77 of file FunctionLoc.cpp.

References EDoc::DictionarySpecific::dict, EDoc::Dictionary::functions, possible, and value.

EDoc::FunctionLoc::Read ( EDoc::PersistenceIFace file,
EDoc::IndexedDictionary idict 
)

See CodeBlock::Read().

Note:
EDoc++ data included.
Exceptions:
EDoc::EOFException 
EDoc::FileIOException 

Definition at line 94 of file FunctionLoc.cpp.

References EDoc::IndexedDictionary::functions, KEY_FUNCTION, loc, EDoc::Location::Read(), EDoc::PersistenceIFace::ReadUInt32(), and value.

EDoc::FunctionLoc::Write ( EDoc::PersistenceIFace file  )  const

See CodeBlock::Write().

Note:
EDoc++ data included.
Exceptions:
EDoc::FileIOException 

Definition at line 102 of file FunctionLoc.cpp.

References EDOC_ASSERT, EDoc::Function::GetDeclaredName(), EDoc::StringIdentifiedObject::GetIndex(), KEY_FUNCTION, loc, value, EDoc::Location::Write(), and EDoc::PersistenceIFace::WriteUInt32Debug().

EDoc::FunctionLoc::ReplaceReferences ( EDoc::PStack stack,
void *  remove,
void *  replace 
) [virtual]

See DictionarySpecific::ReplaceReferences().

Note:
EDoc++ data included.

Implements EDoc::DictionarySpecific.

Definition at line 161 of file FunctionLoc.cpp.

References EDOC_REPLACE, loc, EDoc::PStack::Push(), EDoc::Location::ReplaceReferences(), and value.

Referenced by EDoc::PropogatingException::ReplaceReferences().

EDoc::FunctionLoc::Print ( std::ostream &  out,
std::string  prefix = "" 
) const [virtual]

See DictionarySpecific::Print().

Note:
EDoc++ data included.

Implements EDoc::DictionarySpecific.

Definition at line 195 of file FunctionLoc.cpp.

References EDoc::StringIdentifiedObject::GetKeyName(), loc, EDoc::Location::Print(), and value.

Referenced by EDoc::PropogatingException::Print().

EDoc::FunctionLoc::Validate ( EDoc::PStack stack,
const Dictionary dict_in 
) const [virtual]

See DictionarySpecific::Validate().

Note:
EDoc++ data included.

Implements EDoc::DictionarySpecific.

Definition at line 178 of file FunctionLoc.cpp.

References EDoc::DictionarySpecific::dict, EDOC_ASSERT, loc, EDoc::Function::Validate(), EDoc::Location::Validate(), and value.

Referenced by EDoc::PropogatingException::Validate().

EDoc::FunctionLoc::operator== ( const FunctionLoc right  )  const

Equivilance operator (Works across dictionaries).

Note:
EDoc++ data included.

Definition at line 113 of file FunctionLoc.cpp.

References EDoc::Function::GetNormalisedName(), loc, and value.

EDoc::FunctionLoc::operator< ( const FunctionLoc right  )  const

Less than comparison so this can be used for std::map keys.

Compares Location first then Function instances.

Definition at line 132 of file FunctionLoc.cpp.

References EDoc::StringIdentifiedObject::GetKeyName(), loc, and value.

EDoc::DictionarySpecific::ToString ( std::string  prefix = ""  )  const [inherited]

Returns a string representing the current object in a user readable manner.

This will return as a string exactly what Print() would display. This is primarily here for use from within python and for debugging.

Definition at line 34 of file DictionarySpecific.cpp.

References EDoc::DictionarySpecific::Print().

Referenced by EDoc::Dictionary::Read().


Field Documentation

Location EDoc::FunctionLoc::loc

A location in a source file.

Definition at line 121 of file FunctionLoc.h.

Referenced by operator<(), operator==(), Print(), EDoc::Dictionary::ProcessCodeBlock(), EDoc::Dictionary::ProcessTryBlock(), Read(), ReplaceReferences(), Validate(), and Write().

Function* EDoc::FunctionLoc::value

A reference to a Function.

Note: As part of a propagating exception instance this value may be NULL indicating that the propagating exception is an originating exception. So remember that this may have at some points a NULL value.

Definition at line 130 of file FunctionLoc.h.

Referenced by FunctionLoc(), operator<(), operator=(), operator==(), Print(), EDoc::Dictionary::ProcessCodeBlock(), EDoc::Dictionary::ProcessFunction(), EDoc::Dictionary::ProcessTryBlock(), Read(), ReplaceReferences(), Validate(), and Write().

bool EDoc::FunctionLoc::possible

When this object respresents a function call, then this flag is true if the call is a "possible" call and not an explicit call.

A possible call is one that results from a function pointer call or a virtual function call.

Definition at line 139 of file FunctionLoc.h.

Referenced by EDoc::AddPException(), EDoc::AddRethrow(), operator=(), and EDoc::PropogatingException::Validate().

bool EDoc::FunctionLoc::is_top_level

USED ONLY FROM Dictionary::CalculatePropogatingExceptions().

Data used by the CalculatePropogatingExceptions in order to determine if a function loc object represents the current function whose exception list is being calculated. This is really just temporary data and does not belong here, but it is the simplest place to put it.

Definition at line 155 of file FunctionLoc.h.

Referenced by EDoc::Dictionary::GenerateExceptions(), EDoc::Dictionary::ProcessFunction(), and EDoc::Dictionary::ProcessTryBlock().

Dictionary& EDoc::DictionarySpecific::dict [protected, inherited]

A reference to the dictionary this object belongs to.

Definition at line 150 of file DictionarySpecific.h.

Referenced by EDoc::ManagedObject::CAlwaysGet(), EDoc::CatchBlock::CatchBlock(), EDoc::Exception::Exception(), EDoc::Function::ExpandCallGraph(), EDoc::CodeBlock::ExpandCallGraph(), FunctionLoc(), EDoc::FunctionTypeLoc::FunctionTypeLoc(), EDoc::Function::GetSubstException(), EDoc::Location::Location(), EDoc::ManagedObject::ManagedObject(), EDoc::Type::Merge(), EDoc::Location::Merge(), EDoc::Function::Merge(), EDoc::SpecificManagedObject< EDoc::Type >::New(), EDoc::TypeLoc::operator=(), EDoc::Type::operator=(), EDoc::TryBlock::operator=(), EDoc::PropogatingException::operator=(), EDoc::Location::operator=(), EDoc::FunctionTypeLoc::operator=(), EDoc::FunctionType::operator=(), operator=(), EDoc::Function::operator=(), EDoc::Exception::operator=(), EDoc::CodeBlock::operator=(), EDoc::PropogatingException::PropogatingException(), EDoc::TryBlock::Read(), EDoc::Function::Read(), EDoc::CodeBlock::Read(), EDoc::TryBlock::TryBlock(), EDoc::TypeLoc::TypeLoc(), EDoc::TypeLoc::Validate(), EDoc::Type::Validate(), EDoc::TryBlock::Validate(), EDoc::PropogatingException::Validate(), EDoc::ManagedObject::Validate(), EDoc::Location::Validate(), EDoc::FunctionTypeLoc::Validate(), EDoc::FunctionType::Validate(), Validate(), EDoc::Function::Validate(), EDoc::File::Validate(), EDoc::Exception::Validate(), EDoc::CodeBlock::Validate(), EDoc::CatchBlock::Validate(), EDoc::Type::Write(), and EDoc::Function::Write().


The documentation for this class was generated from the following files:
Generated on Tue Jan 20 18:26:09 2009 for EDoc-0.2.1 by  doxygen 1.5.1