From 1cb9977463f5a832b3f6daea8a2322d38dbba423 Mon Sep 17 00:00:00 2001 From: Marc Laukien Date: Mon, 24 Jun 2002 18:49:27 +0000 Subject: unix format --- cpp/include/Slice/JavaUtil.h | 224 +++++++++++++++++++++---------------------- 1 file changed, 112 insertions(+), 112 deletions(-) (limited to 'cpp/include/Slice/JavaUtil.h') diff --git a/cpp/include/Slice/JavaUtil.h b/cpp/include/Slice/JavaUtil.h index c35be0909be..fb7a56c2ed1 100644 --- a/cpp/include/Slice/JavaUtil.h +++ b/cpp/include/Slice/JavaUtil.h @@ -1,112 +1,112 @@ -// ********************************************************************** -// -// Copyright (c) 2001 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#ifndef JAVA_UTIL_H -#define JAVA_UTIL_H - -#include -#include - -namespace Slice -{ - -class SLICE_API JavaGenerator : public ::IceUtil::noncopyable -{ -public: - - virtual ~JavaGenerator(); - -protected: - - JavaGenerator(const std::string&, const std::string&); - - // - // Given the fully-scoped Java class name, create any intermediate - // package directories and open the class file - // - bool open(const std::string&); - void close(); - - ::IceUtil::Output& output() const; - - // - // Check a symbol against any of the Java keywords. If a - // match is found, return the symbol with a leading underscore. - // - std::string fixKwd(const std::string&) const; - - // - // Convert a scoped name into a Java class name. If an optional - // scope is provided, the scope will be removed from the result. - // - std::string getAbsolute(const std::string&, - const std::string& = std::string(), - const std::string& = std::string(), - const std::string& = std::string()) const; - - // - // Get the Java name for a type. If an optional scope is provided, - // the scope will be removed from the result if possible. - // - enum TypeMode - { - TypeModeIn, - TypeModeOut, - TypeModeMember, - TypeModeReturn - }; - std::string typeToString(const TypePtr&, TypeMode mode, - const std::string& = std::string(), - const std::list& = std::list()) const; - - // - // Generate code to marshal or unmarshal a type - // - void writeMarshalUnmarshalCode(::IceUtil::Output&, const std::string&, const TypePtr&, const std::string&, - bool, int&, bool = false, const std::list& = std::list()); - - // - // Generate code to marshal or unmarshal a sequence type - // - void writeSequenceMarshalUnmarshalCode(::IceUtil::Output&, const std::string&, const SequencePtr&, - const std::string&, bool, int&, bool, - const std::list& = std::list()); - - // - // Generate generic code to marshal or unmarshal a type - // - void writeGenericMarshalUnmarshalCode(::IceUtil::Output&, const std::string&, const TypePtr&, - const std::string&, const std::string&, bool, int&, bool = false, - const std::list& = std::list()); - - // - // Generate generic code to marshal or unmarshal a sequence type - // - void writeGenericSequenceMarshalUnmarshalCode(::IceUtil::Output&, const std::string&, const SequencePtr&, - const std::string&, const std::string&, bool, int&, bool, - const std::list& = std::list()); - -protected: - - static std::string findMetaData(const std::list&); - -private: - - void printHeader(); - - std::string _dir; - std::string _package; - - ::IceUtil::Output* _out; -}; - -} - -#endif +// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#ifndef JAVA_UTIL_H +#define JAVA_UTIL_H + +#include +#include + +namespace Slice +{ + +class SLICE_API JavaGenerator : public ::IceUtil::noncopyable +{ +public: + + virtual ~JavaGenerator(); + +protected: + + JavaGenerator(const std::string&, const std::string&); + + // + // Given the fully-scoped Java class name, create any intermediate + // package directories and open the class file + // + bool open(const std::string&); + void close(); + + ::IceUtil::Output& output() const; + + // + // Check a symbol against any of the Java keywords. If a + // match is found, return the symbol with a leading underscore. + // + std::string fixKwd(const std::string&) const; + + // + // Convert a scoped name into a Java class name. If an optional + // scope is provided, the scope will be removed from the result. + // + std::string getAbsolute(const std::string&, + const std::string& = std::string(), + const std::string& = std::string(), + const std::string& = std::string()) const; + + // + // Get the Java name for a type. If an optional scope is provided, + // the scope will be removed from the result if possible. + // + enum TypeMode + { + TypeModeIn, + TypeModeOut, + TypeModeMember, + TypeModeReturn + }; + std::string typeToString(const TypePtr&, TypeMode mode, + const std::string& = std::string(), + const std::list& = std::list()) const; + + // + // Generate code to marshal or unmarshal a type + // + void writeMarshalUnmarshalCode(::IceUtil::Output&, const std::string&, const TypePtr&, const std::string&, + bool, int&, bool = false, const std::list& = std::list()); + + // + // Generate code to marshal or unmarshal a sequence type + // + void writeSequenceMarshalUnmarshalCode(::IceUtil::Output&, const std::string&, const SequencePtr&, + const std::string&, bool, int&, bool, + const std::list& = std::list()); + + // + // Generate generic code to marshal or unmarshal a type + // + void writeGenericMarshalUnmarshalCode(::IceUtil::Output&, const std::string&, const TypePtr&, + const std::string&, const std::string&, bool, int&, bool = false, + const std::list& = std::list()); + + // + // Generate generic code to marshal or unmarshal a sequence type + // + void writeGenericSequenceMarshalUnmarshalCode(::IceUtil::Output&, const std::string&, const SequencePtr&, + const std::string&, const std::string&, bool, int&, bool, + const std::list& = std::list()); + +protected: + + static std::string findMetaData(const std::list&); + +private: + + void printHeader(); + + std::string _dir; + std::string _package; + + ::IceUtil::Output* _out; +}; + +} + +#endif -- cgit v1.2.3