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

« back to all changes in this revision

Viewing changes to Puma/src/infos/CRecord.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 __CRecord_h__
20
20
#define __CRecord_h__
21
21
 
22
 
// base class of class and union infos
 
22
/** \file 
 
23
 *  Semantic information about a class or union. */
23
24
 
24
25
#include "Puma/CStructure.h"
25
26
 
28
29
 
29
30
class CTemplateInfo;
30
31
 
 
32
 
 
33
/** \class CRecord CRecord.h Puma/CRecord.h
 
34
 *  Semantic information about a class or union. */
31
35
class CRecord : public CStructure {
32
 
//  // classes/unions using this as/in an attribute.
33
 
//  Array<CObjectInfo*> _Referer;     
34
 
//  // classes/unions/enums used by this class/union as/in an attribute.
35
 
//  Array<CObjectInfo*> _Used; 
36
 
//  // methods (defined) of other classes/unions using this 
37
 
//  // class/union as argument/result. 
38
 
//  Array<CFunctionInfo*> _Transferer;
39
 
//  // classes/unions/enums used as/in arguments/results of (defined) 
40
 
//  // methods of this class/union.
41
 
//  Array<CObjectInfo*> _Transfered;
42
 
 
43
36
  CTemplateInfo *_TemplateInfo;
44
37
  bool _isTemplate;
45
38
  bool _hiddenFwdDecl;
46
39
 
47
40
protected:
48
 
  CRecord (ObjectId);
 
41
  /** Constructor.
 
42
   *  \param id The object type. */
 
43
  CRecord (ObjectId id);
49
44
 
50
45
public:
 
46
  /** Destructor. */
51
47
  ~CRecord ();
52
48
 
 
49
  /** Get the template information if this is a class or union template.
 
50
   *  \return The template information or NULL if not a template. */
53
51
  CTemplateInfo *TemplateInfo () const;
54
 
  void TemplateInfo (CTemplateInfo *);
55
 
 
56
 
  void QualifiedScope (CStructure *);
57
 
 
58
 
  // Get ... 
59
 
  bool isComplete (unsigned long = 0) const;        // is complete type?
60
 
  bool isDefined () const;                        // has a definition?
61
 
  bool isTemplate () const;                        // is class template?
62
 
  bool isHiddenForwardDecl () const;            // hides names?
63
 
//  unsigned Referers () const;
64
 
//  unsigned Usages () const;
65
 
//  unsigned Transferers () const;
66
 
//  unsigned Transfers () const;
67
 
//  CObjectInfo *Referer (unsigned) const;
68
 
//  CObjectInfo *Referer (const char *) const;
69
 
//  CObjectInfo *Usage (unsigned) const;
70
 
//  CObjectInfo *Usage (const char *) const;
71
 
//  CFunctionInfo *Transferer (unsigned) const;
72
 
//  CFunctionInfo *Transferer (const char *) const;
73
 
//  CObjectInfo *Transfer (unsigned) const;
74
 
//  CObjectInfo *Transfer (const char *) const;
75
 
//  bool isReferer (const CObjectInfo *) const;
76
 
//  bool isUsed (const CObjectInfo *) const;
77
 
//  bool isTransferer (const CFunctionInfo *) const;
78
 
//  bool isTransfered (const CObjectInfo *) const;
79
 
 
80
 
  // Set ... 
81
 
  void isTemplate (bool);
82
 
  void isHiddenForwardDecl (bool);
83
 
//  void addReferer (CObjectInfo *);
84
 
//  void addUsage (CObjectInfo *);
85
 
//  void addTransferer (CFunctionInfo *);
86
 
//  void addTransfer (CObjectInfo *);
87
 
//  void removeReferer (const CObjectInfo *);      // WILL NOT BE DESTROYED!
88
 
//  void removeUsage (const CObjectInfo *);        // WILL NOT BE DESTROYED!
89
 
//  void removeTransferer (const CFunctionInfo *); // WILL NOT BE DESTROYED!
90
 
//  void removeTransfer (const CObjectInfo *);     // WILL NOT BE DESTROYED!
91
 
 
92
 
  // additional information
93
 
//  bool isForward () const;
 
52
  /** Set the template information of a class/union template.
 
53
   *  \param info The template information. */
 
54
  void TemplateInfo (CTemplateInfo *info);
 
55
 
 
56
  /** Set the qualification scope of a nested class or union 
 
57
   *  or class/union declared in a namespace.
 
58
   *  \param scope The qualification scope. */
 
59
  void QualifiedScope (CStructure *scope);
 
60
 
 
61
  /** Check if the class/union is complete (defined)
 
62
   *  at the given source code position. The position
 
63
   *  is specified by the unique number of the CT_Token
 
64
   *  tree node representing the name of the class/union.
 
65
   *  \param pos The source code position. */
 
66
  bool isComplete (unsigned long pos = 0) const;
 
67
  /** Check if the class/union is defined. */
 
68
  bool isDefined () const;
 
69
  /** Check if the class/union is a template. */
 
70
  bool isTemplate () const;
 
71
  /** Check if this is a class/union forward declaration
 
72
   *  hidden by another declaration in the same scope. */
 
73
  bool isHiddenForwardDecl () const;
 
74
 
 
75
  /** Set whether this class/union is a template.
 
76
   *  \param v \e true if it is a template. */
 
77
  void isTemplate (bool v);
 
78
  /** Set whether this is a class/union forward declaration
 
79
   *  hidden by another declaration in the same scope. 
 
80
   *  \param v \e true if it is a hidden forward declaration. */
 
81
  void isHiddenForwardDecl (bool v);
94
82
};
95
83
 
96
84
inline CRecord::CRecord (CObjectInfo::ObjectId id) :