summaryrefslogtreecommitdiff
path: root/cpp/include/Slice/CPlusPlusUtil.h
blob: fdacc2bf8db1a8625522b2acbc158b297eaa91d7 (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
// **********************************************************************
//
// Copyright (c) 2001
// MutableRealms, Inc.
// Huntsville, AL, USA
//
// All Rights Reserved
//
// **********************************************************************

#ifndef C_PLUS_PLUS_UTIL_H
#define C_PLUS_PLUS_UTIL_H

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

namespace Slice
{

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

SLICE_API std::string changeInclude(const std::string&, const std::vector<std::string>&);
SLICE_API void printHeader(::IceUtil::Output&);
SLICE_API void printVersionCheck(::IceUtil::Output&);
SLICE_API void printDllExportStuff(::IceUtil::Output&, const std::string&);

SLICE_API std::string typeToString(const TypePtr&);
SLICE_API std::string returnTypeToString(const TypePtr&);
SLICE_API std::string inputTypeToString(const TypePtr&);
SLICE_API std::string outputTypeToString(const TypePtr&);

SLICE_API void writeMarshalUnmarshalCode(::IceUtil::Output&, const TypePtr&, const std::string&, bool,
					 const std::string& = "", bool = true);
SLICE_API void writeMarshalCode(::IceUtil::Output&, const std::list<std::pair<TypePtr, std::string> >&,
				const TypePtr&);
SLICE_API void writeUnmarshalCode(::IceUtil::Output&, const std::list<std::pair<TypePtr, std::string> >&,
				  const TypePtr&);
SLICE_API void writeAllocateCode(::IceUtil::Output&, const std::list<std::pair<TypePtr, std::string> >&,
				 const TypePtr&);

SLICE_API void writeGenericMarshalUnmarshalCode(::IceUtil::Output&, const TypePtr&, const std::string&, bool,
						const std::string& = "", const std::string& = "", bool = true);

SLICE_API void writeGenericMarshalCode(::IceUtil::Output&, const std::list<std::pair<TypePtr, std::string> >&,
				       const TypePtr&);
SLICE_API void writeGenericUnmarshalCode(::IceUtil::Output&, const std::list<std::pair<TypePtr, std::string> >&,
					 const TypePtr&);

}

#endif