1 // **********************************************************************
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
8 // **********************************************************************
10 #ifndef SLICE_RUBY_UTIL_H
11 #define SLICE_RUBY_UTIL_H
13 #include <Slice/Parser.h>
14 #include <IceUtil/OutputUtil.h>
22 // Generate Ruby code for a translation unit.
24 SLICE_API
void generate(const Slice::UnitPtr
&, bool, bool, const std::vector
<std::string
>&, IceUtilInternal::Output
&);
27 // Check the given identifier against Ruby's list of reserved words. If it matches
28 // a reserved word, then an escaped version is returned with a leading underscore.
33 IdentToUpper
, // Mapped identifier must begin with an upper-case letter.
34 IdentToLower
// Mapped identifier must begin with a lower-case letter.
36 SLICE_API
std::string
fixIdent(const std::string
&, IdentStyle
);
39 // Get the fully-qualified name of the given definition. If a prefix is provided,
40 // it is prepended to the definition's unqualified name.
42 SLICE_API
std::string
getAbsolute(const Slice::ContainedPtr
&, IdentStyle
, const std::string
& = std::string());
45 // Emit a comment header.
47 SLICE_API
void printHeader(IceUtilInternal::Output
&);