blob: 385a5ceb331684af2193cb2ea33bbf44eb30a6d9 (
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
51
52
53
54
55
56
57
58
59
|
// file : CIDLC/ServantSourceGenerator.hpp
// author : Jeff Parsons <j.parsons@vanderbilt.edu>
// cvs-id : $Id$
#ifndef SERVANT_SOURCE_GENERATOR_HPP
#define SERVANT_SOURCE_GENERATOR_HPP
#include "CCF/CodeGenerationKit/CommandLine.hpp"
#include "Collectors.hpp"
#include "CCF/CIDL/SyntaxTree.hpp"
#include "CCF/CIDL/Traversal.hpp"
// SourceEmitterBase is a base class that holds the ostream member
// common to every other class in this file.
//
class SourceEmitterBase
{
protected:
SourceEmitterBase (std::ostream&);
std::ostream& os;
};
// Emitter generates the servant source mapping for declarations collected
// by Collector. Note that the original structure of modules is preserved.
//
class ServantSourceEmitter
: public SourceEmitterBase,
public CCF::CIDL::Traversal::TranslationUnit
{
public:
ServantSourceEmitter (std::ostream& os_,
std::string export_macro,
CommandLine const& cl,
Declarations const& declarations);
virtual void
generate (CCF::CIDL::SyntaxTree::TranslationUnitPtr const& u);
virtual void
pre (CCF::CIDL::SyntaxTree::TranslationUnitPtr const&);
private:
CommandLine const& cl_;
std::string export_macro_;
Declarations const& declarations_;
};
#endif // SERVANT_SOURCE_GENERATOR_HPP
/*
* Local Variables:
* mode: C++
* c-basic-offset: 2
* End:
*/
|