~ubuntu-branches/ubuntu/jaunty/aspectc++/jaunty

« back to all changes in this revision

Viewing changes to Puma/gen-release/step1/inc/Puma/CSourceInfo.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-07-07 14:41:02 UTC
  • mfrom: (1.1.3 upstream) (6.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080707144102-lzml7t07f3sl00r5
Tags: 1.0pre4~svn.20080711-1
* new upstream snapshot.
* include all upstream documentation. Clarifying emails regarding
  licensing has been included into debian/copyright.
* reformat description following recomendations of
  http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description
  (Closes: #480316)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#ifndef __CSourceInfo_h__
20
20
#define __CSourceInfo_h__
21
21
 
22
 
// stores source file information
23
 
// knows the file and the start token where an entity
24
 
// was declared in a program
 
22
/** \file
 
23
 *  Source file information. */
25
24
 
26
25
namespace Puma {
27
26
 
31
30
class Token;
32
31
class Unit;
33
32
 
 
33
 
 
34
/** \class CSourceInfo CSourceInfo.h Puma/CSourceInfo.h
 
35
 *  Source file information for an entity. Stores the 
 
36
 *  file information and start token of the entity in
 
37
 *  the source file. */
34
38
class CSourceInfo {
35
39
  CFileInfo *_FileInfo; 
36
40
  CT_Token *_StartToken;
37
41
 
38
42
public: 
 
43
  /** Constructor. */
39
44
  CSourceInfo ();
 
45
  /** Destructor. */
40
46
  ~CSourceInfo ();
41
47
  
42
 
  bool operator ==(const CSourceInfo &) const;
43
 
  bool operator !=(const CSourceInfo &) const;
44
 
  bool operator <(const CSourceInfo &) const;
45
 
  bool operator >(const CSourceInfo &) const;
46
 
  bool operator <=(const CSourceInfo &) const;
47
 
  bool operator >=(const CSourceInfo &) const;
48
 
 
49
 
  bool operator ==(const CT_Token *) const;
50
 
  bool operator !=(const CT_Token *) const;
51
 
  bool operator <(const CT_Token *) const;
52
 
  bool operator >(const CT_Token *) const;
53
 
  bool operator <=(const CT_Token *) const;
54
 
  bool operator >=(const CT_Token *) const;
55
 
 
56
 
  bool operator ==(const Token *) const;
57
 
 
58
 
  // Get ...
 
48
  /** Check if the source file locations are equal. 
 
49
   *  \param si The source file location to compare with. */
 
50
  bool operator ==(const CSourceInfo &si) const;
 
51
  /** Check if the source file locations are not equal. 
 
52
   *  \param si The source file location to compare with. */
 
53
  bool operator !=(const CSourceInfo &si) const;
 
54
  /** Check if this source file location is before the given location. 
 
55
   *  \param si The source file location to compare with. */
 
56
  bool operator <(const CSourceInfo &si) const;
 
57
  /** Check if this source file location is behind the given location. 
 
58
   *  \param si The source file location to compare with. */
 
59
  bool operator >(const CSourceInfo &si) const;
 
60
  /** Check if this source file location equals or is before the given location. 
 
61
   *  \param si The source file location to compare with. */
 
62
  bool operator <=(const CSourceInfo &si) const;
 
63
  /** Check if this source file location equals or is behind the given location. 
 
64
   *  \param si The source file location to compare with. */
 
65
  bool operator >=(const CSourceInfo &si) const;
 
66
 
 
67
  /** Check if the source file locations are equal. 
 
68
   *  \param token The token in the source file to compare with. */
 
69
  bool operator ==(const CT_Token *token) const;
 
70
  /** Check if the source file locations are not equal. 
 
71
   *  \param token The token in the source file to compare with. */
 
72
  bool operator !=(const CT_Token *token) const;
 
73
  /** Check if this source file location is before the given location. 
 
74
   *  \param token The token in the source file to compare with. */
 
75
  bool operator <(const CT_Token *token) const;
 
76
  /** Check if this source file location is behind the given location. 
 
77
   *  \param token The token in the source file to compare with. */
 
78
  bool operator >(const CT_Token *token) const;
 
79
  /** Check if this source file location equals or is before the given location. 
 
80
   *  \param token The token in the source file to compare with. */
 
81
  bool operator <=(const CT_Token *token) const;
 
82
  /** Check if this source file location equals or is behind the given location. 
 
83
   *  \param token The token in the source file to compare with. */
 
84
  bool operator >=(const CT_Token *token) const;
 
85
 
 
86
  /** Check if the source file locations are equal. 
 
87
   *  \param token The token in the source file to compare with. */
 
88
  bool operator ==(const Token *token) const;
 
89
 
 
90
  /** Get the source file information. */
59
91
  CFileInfo *FileInfo () const;
 
92
  /** Get the start token of the entity in the source file. */
60
93
  CT_Token *StartToken () const;
61
 
  const char *FileName () const; // the file where it is located
 
94
  /** Get name of the source file. */
 
95
  const char *FileName () const;
 
96
  /** Get the line number of the entity in the source file. */
62
97
  int Line () const;
 
98
  /** Get the column number of the entity in the source file. */
 
99
  int Column () const;
 
100
  /** Get the token unit of the source file. */
63
101
  Unit *SrcUnit () const;
64
102
 
65
 
  // Set ... 
66
 
  void FileInfo (CFileInfo *);
67
 
  void StartToken (CT_Token *);
 
103
  /** Set the source file information. 
 
104
   *  \param file The source file. */
 
105
  void FileInfo (CFileInfo *file);
 
106
  /** Set the start token of the entity in the source file. 
 
107
   *  \param token The start token. */
 
108
  void StartToken (CT_Token *token);
68
109
};
69
110
 
70
111
inline CSourceInfo::CSourceInfo () :