~ubuntu-branches/ubuntu/maverick/aspectc++/maverick

« back to all changes in this revision

Viewing changes to Puma/src/infos/CClassDatabase.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "Puma/CScopeInfo.h"
23
23
#include "Puma/CProject.h"
24
24
#include <iostream>
 
25
#include <map>
25
26
using namespace std;
26
27
 
27
28
namespace Puma {
46
47
 *  (infos) of a project. */
47
48
class CClassDatabase {
48
49
  
49
 
  Array<CObjectInfo*> _Classes;   // index of classes
50
 
  Array<CObjectInfo*> _Unions;    // index of unions
51
 
  Array<CObjectInfo*> _Enums;     // index of enums
52
 
  Array<CObjectInfo*> _Typedefs;  // index of typedefs
53
 
  Array<CObjectInfo*> _Functions; // index of functions
54
 
  Array<CObjectInfo*> _Files;     // index of files
 
50
  Array<CObjectInfo*> _Classes;    // index of classes
 
51
  Array<CObjectInfo*> _Unions;     // index of unions
 
52
  Array<CObjectInfo*> _Enums;      // index of enums
 
53
  Array<CObjectInfo*> _Typedefs;   // index of typedefs
 
54
  Array<CObjectInfo*> _Functions;  // index of functions
 
55
  Array<CObjectInfo*> _Files;      // index of files
55
56
 
56
57
  CProject *_Project; // associated project
57
58
  
 
59
  multimap<int,CFunctionInfo*> _builtin_ops; // map for built-in operator lookup
 
60
 
58
61
public:
59
62
  /** Construct a class database object.
60
63
   *  \param prj The corresponding project.
78
81
  unsigned TypedefInfos () const;
79
82
  /** Get the number of function infos. */
80
83
  unsigned FunctionInfos () const;
81
 
  /** Get the number of file infos. */
 
84
  /** Get the number of on-demand generated built-in operator functions. */
82
85
  unsigned FileInfos () const;
83
86
  /** Get the n-th semantic object info.
84
87
   *  \param n The number of the info.
104
107
   *  \param n The number of the info.
105
108
   *  \return The info or \c NULL if \e n is invalid. */
106
109
  CFunctionInfo *FunctionInfo (unsigned n) const;
107
 
  /** Get the n-th file info.
 
110
  /** Get the n-th on-demand generated built-in operator info.
108
111
   *  \param n The number of the info.
109
112
   *  \return The info or \c NULL if \e n is invalid. */
110
113
  CFileInfo *FileInfo (unsigned n) const;
129
132
  /** Remove the given semantic object from the database.
130
133
   *  \param info The semantic object info to remove. */
131
134
  void Remove (CObjectInfo *info);
132
 
 
 
135
  /** Get a function info object for a built-in operator.
 
136
   *  \param name Operator name.
 
137
   *  \param tok Operator token type, used as a key for fast lookup.
 
138
   *  \param rtype result type of the operator. Not used for lookup,
 
139
   *         only for object creation.
 
140
   *  \param t0 first argument type.
 
141
   *  \param t1 second argument type or \c NULL.
 
142
   *  \return on-demand generated operator function object. */
 
143
  CFunctionInfo *BuiltinOperator (const char *name, int tok, CTypeInfo *rtype,
 
144
    CTypeInfo *t0, CTypeInfo *t1);
133
145
  /** Dump the contents of the database. The dump is indented as
134
146
   *  tree corresponding to the nesting of the semantic objects.
135
147
   *  \param out The output stream to dump to.
139
151
  /** Get the project info delivered to the constructor of the database. */
140
152
  CProject *Project () const;
141
153
 
142
 
private: 
 
154
private:
 
155
  void CreateParameter (CFunctionInfo *fi, CTypeInfo *type) const;
 
156
 
143
157
  void Dump (ostream &, CStructure *, int, int) const;
144
158
  void DumpType (ostream &, CObjectInfo *, int) const;
145
159
  void DumpUsing (ostream &, CUsingInfo *, int) const;