summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/include/ast_structure_fwd.h
blob: 4f9e4b6d84fb5e5eae2d9005fbe38cc10f25e9fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef _AST_STRUCTURE_FWD_AST_STRUCTURE_FWD_HH
#define _AST_STRUCTURE_FWD_AST_STRUCTURE_FWD_HH

#include "ast_type.h"
class AST_Structure;

// Representation of a forward structure declaration.

class TAO_IDL_FE_Export AST_StructureFwd : public virtual AST_Type
{
public:
  AST_StructureFwd (AST_Structure *full_defn,
                    UTL_ScopedName *n);

  virtual ~AST_StructureFwd ();

  AST_Structure *full_definition ();
  void set_full_definition (AST_Structure *nfd);

  virtual bool is_defined ();
  void set_as_defined ();

  // Cleanup function.
  virtual void destroy ();

  // AST Dumping.
  virtual void dump (ACE_OSTREAM_TYPE &);

  // Visiting.
  virtual int ast_accept (ast_visitor *visitor);

  // Is this decl a forward declared type (Yes)
  virtual bool is_fwd ();

  // We don't actually want the forward declaration,
  // but want to return the full definition member,
  // whether defined yet or not.
  virtual AST_Decl *adjust_found (bool ignore_fwd, bool full_def_only);

  static AST_Decl::NodeType const NT;

private:
  AST_Structure *pd_full_definition;
  // The structure this is a forward declaration of.

  bool is_defined_;
  // Checking the member above isn't good enough.
};

#endif           // _AST_STRUCTURE_FWD_AST_STRUCTURE_FWD_HH