yast2-core
Point.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | |
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
8 | |
9 | core system |
10 | Copyright 2003, SuSE Linux AG |
11 \----------------------------------------------------------------------/
12 
13  File: Point.h
14 
15  Author: Klaus Kaempf <kkaempf@suse.de>
16  Maintainer: Klaus Kaempf <kkaempf@suse.de>
17 /-*/
18 // -*- c++ -*-
19 
20 #ifndef Point_h
21 #define Point_h
22 
23 #include <string>
24 using std::string;
25 
26 // MemUsage.h defines/undefines D_MEMUSAGE
27 #include <y2util/MemUsage.h>
28 #include "y2/SymbolEntry.h"
29 
30 class bytecodeistream;
31 
59 class Point
60 #ifdef D_MEMUSAGE
61  : public MemUsage
62 #endif
63 {
64  private:
65  SymbolEntryPtr m_entry; // filename as SymbolEntry (c_filename)
66  int m_line; // line of definition / inclusion
67  const Point *m_point; // points to toplevel point for include files
68  public:
69  size_t mem_size () const { return sizeof (Point); }
70  Point (std::string filename, int line = 0, const Point *point = 0);
71  Point (SymbolEntryPtr sentry, int line = 0, const Point *point = 0);
73  ~Point (void);
74 
75  SymbolEntryPtr sentry (void) const;
76  std::string filename (void) const;
77  int line (void) const;
78  const Point *point (void) const;
79 
80  std::string toString (void) const;
81  std::ostream & toStream (std::ostream & str) const;
82  std::ostream & toXml (std::ostream & str, int indent ) const;
83 };
84 #endif // Point_h
#define str
Definition: scanner.cc:1003
int line(void) const
Definition: Point.cc:105
~Point(void)
Definition: Point.cc:85
size_t mem_size() const
Definition: Point.h:69
Definition: Point.h:59
std::string filename(void) const
Definition: Point.cc:98
std::ostream & toXml(std::ostream &str, int indent) const
Definition: Point.cc:174
Point(std::string filename, int line=0, const Point *point=0)
Definition: Point.cc:59
std::ostream & toStream(std::ostream &str) const
Definition: Point.cc:153
SymbolEntryPtr sentry(void) const
Definition: Point.cc:91
const Point * m_point
Definition: Point.h:67
std::string toString(void) const
Definition: Point.cc:119
An istream that remembers some data about the bytecode.
Definition: Bytecode.h:42
SymbolEntryPtr m_entry
Definition: Point.h:65
int m_line
Definition: Point.h:66
Definition: MemUsage.h:37
const Point * point(void) const
Definition: Point.cc:112

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