-
Notifications
You must be signed in to change notification settings - Fork 3
/
MummyGenerator.h
96 lines (78 loc) · 2.99 KB
/
MummyGenerator.h
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//----------------------------------------------------------------------------
// MummyGenerator.h
//
// Author(s) : David Cole
//
// Copyright (C) 2006-2007 Kitware, Inc.
//----------------------------------------------------------------------------
#ifndef _MummyGenerator_h_
#define _MummyGenerator_h_
#include "MummyUtilities.h" // first mummy include for root classes
#include "cableGenerator.h" // parent class
#include "cableContext.h" // enum Context::Access
#include "gxsys/ios/iosfwd"
namespace cable
{
class Class;
class Context;
class FunctionType;
class Method;
class Type;
}
class MummyLineOrientedTextFileReader;
class MummySettings;
//----------------------------------------------------------------------------
/// <summary>
/// Base class for all Mummy generators.
/// </summary>
class MummyGenerator : public cable::Generator
{
public:
MummyGenerator();
virtual ~MummyGenerator();
//--------------------------------------------------------------------------
/// <summary>
/// Get the associated settings object.
/// </summary>
/// <returns>Associated MummySettings object.</returns>
virtual MummySettings* GetSettings();
//--------------------------------------------------------------------------
/// <summary>
/// Set the associated settings object.
/// </summary>
/// <param name='settings'>MummySettings object</param>
virtual void SetSettings(MummySettings* settings);
//--------------------------------------------------------------------------
/// <summary>
/// Get the current target class.
/// </summary>
/// <returns>Associated Class object.</returns>
virtual const cable::Class* GetTargetClass();
//--------------------------------------------------------------------------
/// <summary>
/// Set the current target class.
/// </summary>
/// <param name='c'>Class object</param>
virtual void SetTargetClass(const cable::Class *c);
virtual bool FundamentalTypeIsWrappable(const cable::Type* t);
virtual bool TypeIsWrappable(const cable::Type* t);
virtual bool FunctionTypeIsWrappable(const cable::FunctionType* ft);
virtual bool MethodIsWrappable(const cable::Method* m, const cable::Context::Access& access);
virtual bool ClassIsWrappable(const cable::Class* c);
//--------------------------------------------------------------------------
/// <summary>
/// Get or create a header file reader. Only uses class 'c' on the first
/// call. Subsequent calls retrieve the same reader instance.
/// </summary>
/// <param name='c'>Class object</param>
/// <returns>Header file reader</returns>
virtual MummyLineOrientedTextFileReader* GetHeaderFileReader(const cable::Class* c);
virtual void EmitMummyVersionComments(gxsys_ios::ostream &os, const char *lineCommentString);
private:
MummySettings* Settings;
const cable::Class* TargetClass;
MummyLineOrientedTextFileReader* HeaderFileReader;
MummyGenerator(const MummyGenerator&); //Not implemented
MummyGenerator& operator=(const MummyGenerator&); //Not implemented
};
#endif