yast2-core
Public Member Functions | Private Attributes | List of all members
Point Class Reference

#include <Point.h>

Public Member Functions

size_t mem_size () const
 
 Point (std::string filename, int line=0, const Point *point=0)
 
 Point (SymbolEntryPtr sentry, int line=0, const Point *point=0)
 
 Point (bytecodeistream &str)
 
 ~Point (void)
 
SymbolEntryPtr sentry (void) const
 
std::string filename (void) const
 
int line (void) const
 
const Pointpoint (void) const
 
std::string toString (void) const
 
std::ostream & toStream (std::ostream &str) const
 
std::ostream & toXml (std::ostream &str, int indent) const
 

Private Attributes

SymbolEntryPtr m_entry
 
int m_line
 
const Pointm_point
 

Detailed Description

Definition of "definition point" which stores

This helps in issuing proper error messages like "identifier <name> defined in <file1> at <line1> included from <file2> at <line2> included from <toplevel> at <line>"

A TableEntry (identifier <name>) has a Point which stores the definition point (Point) of this identifier. If its Point is in an include file, the m_point member points to the inclusion point (where the 'include ".."' statement is) of the include file.

Point works as a linked list (file1 -> file2 -> toplevel in the above example) for definition points inside include files. The real structure is a tree since for the next include of file3 inside file2, the list is file3 -> file2 -> toplevel and the latter two nodes are shared.

An identifier has a definition point. A file has a filename and an inclusion point (if its an included file).

Constructor & Destructor Documentation

Point::Point ( std::string  filename,
int  line = 0,
const Point point = 0 
)

References line(), toString(), and y2debug.

Referenced by mem_size(), and Point().

Point::Point ( SymbolEntryPtr  sentry,
int  line = 0,
const Point point = 0 
)

References line(), toString(), and y2debug.

Point::Point ( bytecodeistream str)
Point::~Point ( void  )

Member Function Documentation

std::string Point::filename ( void  ) const
int Point::line ( void  ) const
size_t Point::mem_size ( ) const
inline

References Point().

const Point * Point::point ( void  ) const
SymbolEntryPtr Point::sentry ( void  ) const

References m_entry.

Referenced by TableEntry::makeDefinition().

std::ostream & Point::toStream ( std::ostream &  str) const
std::string Point::toString ( void  ) const
std::ostream & Point::toXml ( std::ostream &  str,
int  indent 
) const

Member Data Documentation

SymbolEntryPtr Point::m_entry
private
int Point::m_line
private

Referenced by line(), toStream(), toString(), and toXml().

const Point* Point::m_point
private

Referenced by Point(), point(), toStream(), toString(), and toXml().


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

Generated on a sunny day for yast2-core by doxygen 1.8.5