summaryrefslogtreecommitdiff
path: root/cpp/include/Slice/CPlusPlusUtil.h
blob: 0f121bcda98f3b613ee495324b9d6d630a049b6a (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
// **********************************************************************
//
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

#ifndef C_PLUS_PLUS_UTIL_H
#define C_PLUS_PLUS_UTIL_H

#include <Slice/Parser.h>
#include <IceUtil/OutputUtil.h>

namespace Slice
{

SLICE_API extern FeatureProfile featureProfile;

struct ToIfdef
{
    SLICE_API char operator()(char);
};

SLICE_API void printHeader(::IceUtilInternal::Output&);
SLICE_API void printVersionCheck(::IceUtilInternal::Output&);
SLICE_API void printDllExportStuff(::IceUtilInternal::Output&, const std::string&);

SLICE_API std::string typeToString(const TypePtr&, bool, const StringList& = StringList(), bool = true);
SLICE_API std::string returnTypeToString(const TypePtr&, bool, const StringList& = StringList());
SLICE_API std::string inputTypeToString(const TypePtr&, bool, const StringList& = StringList());
SLICE_API std::string outputTypeToString(const TypePtr&, bool, const StringList& = StringList());
SLICE_API std::string operationModeToString(Operation::Mode);

SLICE_API std::string fixKwd(const std::string&);

SLICE_API void writeMarshalUnmarshalCode(::IceUtilInternal::Output&, const TypePtr&, const std::string&, bool,
                                         const std::string& = "", bool = true, const StringList& = StringList(),
                                         bool = false);
                                             
SLICE_API void writeMarshalCode(::IceUtilInternal::Output&, const ParamDeclList&, const TypePtr&, 
                                const StringList&, bool = false);
SLICE_API void writeUnmarshalCode(::IceUtilInternal::Output&, const ParamDeclList&, const TypePtr&,
                                  const StringList&, bool = false);

SLICE_API void writeAllocateCode(::IceUtilInternal::Output&, const ParamDeclList&, const TypePtr&,
                                 const StringList&, bool = false, bool = false);
SLICE_API void writeStreamMarshalUnmarshalCode(::IceUtilInternal::Output&, const TypePtr&, const std::string&, bool,
                                               const std::string& = "", bool = false, const StringList& = StringList());
SLICE_API std::string findMetaData(const SequencePtr&, const StringList&, bool, bool&);
SLICE_API std::string findMetaData(const StringList&, bool);
SLICE_API bool inWstringModule(const SequencePtr&);

}

#endif