~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to cpp/src/slice2docbook/Gen.h

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// **********************************************************************
2
 
//
3
 
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
4
 
//
5
 
// This copy of Ice is licensed to you under the terms described in the
6
 
// ICE_LICENSE file included in this distribution.
7
 
//
8
 
// **********************************************************************
9
 
 
10
 
#ifndef GEN_H
11
 
#define GEN_H
12
 
 
13
 
#include <Slice/Parser.h>
14
 
#include <IceUtil/OutputUtil.h>
15
 
#include <stack>
16
 
 
17
 
namespace Slice
18
 
{
19
 
 
20
 
class Gen : private ::IceUtil::noncopyable, public ParserVisitor
21
 
{
22
 
public:
23
 
 
24
 
    Gen(const std::string&, bool, bool, bool, bool);
25
 
    virtual ~Gen();
26
 
 
27
 
    void generate(const UnitPtr&);
28
 
    void closeOutput();
29
 
 
30
 
    virtual bool visitUnitStart(const UnitPtr&);
31
 
    virtual void visitUnitEnd(const UnitPtr&);
32
 
    virtual bool visitModuleStart(const ModulePtr&);
33
 
    virtual void visitContainer(const ContainerPtr&);
34
 
    virtual bool visitClassDefStart(const ClassDefPtr&);
35
 
    virtual bool visitExceptionStart(const ExceptionPtr&);
36
 
    virtual bool visitStructStart(const StructPtr&);
37
 
    virtual void visitEnum(const EnumPtr&);
38
 
    virtual void visitConst(const ConstPtr&);
39
 
 
40
 
private:
41
 
 
42
 
    void printHeader();
43
 
    std::string getComment(const ContainedPtr&, const ContainerPtr&, bool);
44
 
    StringList getTagged(const std::string&, std::string&);
45
 
    void printMetaData(const ContainedPtr&);
46
 
    void printComment(const ContainedPtr&, const std::string&);
47
 
    void printSummary(const ContainedPtr&, bool);
48
 
    void start(const std::string&);
49
 
    void start(const std::string&, const std::string&, bool = true);
50
 
    void end();
51
 
 
52
 
    std::string containedToId(const ContainedPtr&);
53
 
    std::string getScopedMinimized(const ContainedPtr&, const ContainerPtr&);
54
 
    std::string toString(const SyntaxTreeBasePtr&, const ContainerPtr&, bool = true);
55
 
    std::string toString(const std::string&, const ContainerPtr&, bool = true);
56
 
 
57
 
    ::IceUtilInternal::XMLOutput O;
58
 
 
59
 
    bool _standAlone;
60
 
    bool _noGlobals;
61
 
    std::string _chapter;
62
 
    bool _noIndex;
63
 
    bool _sortFields;
64
 
};
65
 
 
66
 
}
67
 
 
68
 
#endif