cz::muni::stanse::codestructures::Unit Class Reference

Holds all the relevant data about the code in one compilation unit (usually a file). More...

Inheritance diagram for cz::muni::stanse::codestructures::Unit:
[legend]
Collaboration diagram for cz::muni::stanse::codestructures::Unit:
[legend]

List of all members.

Public Member Functions

 Unit (File file, InputStream stream)
 Unit (File file) throws IOException
String getName ()
synchronized void drop ()
abstract void parse () throws ParserException

Protected Member Functions

 Unit ()
Document getXMLDocument ()
List< CFGHandlegetCFGHandles ()
CFG getCFG (String functionName)

Protected Attributes

File fileName
InputStream stream
Document xmlDocument
List< CFGHandleCFGHs = null
List< CFGCFGs = null
boolean available = false


Detailed Description

Holds all the relevant data about the code in one compilation unit (usually a file).

This is intended to be a language-independent superclass. For a concrete language create an appropriate subclass. The constructor calls the appropriate parser and fills the CFG and AST structures.


Constructor & Destructor Documentation

cz::muni::stanse::codestructures::Unit::Unit (  )  [inline, protected]

Intentionally empty, called by derived class constructors.

cz::muni::stanse::codestructures::Unit::Unit ( File  file,
InputStream  stream 
) [inline]

Calls the appropriate parser(s) to fill in the data members.

Parameters:
file Name of the unit. Needs to be supplied explicitly, because it is not derivable from a stream.
stream Stream to read the compilation unit from.
Exceptions:
IOException If there any problems with IO.
ParserException In case of parsing problems not related to IO.

cz::muni::stanse::codestructures::Unit::Unit ( File  file  )  throws IOException [inline]

Calls the appropriate parser(s) to fill in the data members.

Parameters:
file Name of the file containing the compilation unit.
Exceptions:
IOException If there any problems with IO.
ParserException In case of parsing problems not related to IO.


Member Function Documentation

String cz::muni::stanse::codestructures::Unit::getName (  )  [inline]

Document cz::muni::stanse::codestructures::Unit::getXMLDocument (  )  [inline, protected]

synchronized void cz::muni::stanse::codestructures::Unit::drop (  )  [inline]

abstract void cz::muni::stanse::codestructures::Unit::parse (  )  throws ParserException [pure virtual]

List<CFGHandle> cz::muni::stanse::codestructures::Unit::getCFGHandles (  )  [inline, protected]

Returns:
Unmodifiable list of CFGs in this compilation unit.

CFG cz::muni::stanse::codestructures::Unit::getCFG ( String  functionName  )  [inline, protected]


Member Data Documentation

Name of the unit

Stream to read from

XML representation of the unit's AST

List of units control flow graphs.

Already available/parsed?


The documentation for this class was generated from the following file:

Generated on Thu Jan 13 16:24:09 2011 for Stanse by  doxygen 1.5.6