summaryrefslogtreecommitdiff
path: root/cpp/include/Slice/JavaUtil.h
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2006-05-23 23:22:31 +0000
committerMark Spruiell <mes@zeroc.com>2006-05-23 23:22:31 +0000
commitde15119814e1ebb8f151b9b52be6103936b392b7 (patch)
treeb091c4a9be65d0a06ded3bfd248417dbd256ee85 /cpp/include/Slice/JavaUtil.h
parentusing portable syntax for custom types (diff)
downloadice-de15119814e1ebb8f151b9b52be6103936b392b7.tar.bz2
ice-de15119814e1ebb8f151b9b52be6103936b392b7.tar.xz
ice-de15119814e1ebb8f151b9b52be6103936b392b7.zip
adding Java5 mapping; bug 848; bug 863
Diffstat (limited to 'cpp/include/Slice/JavaUtil.h')
-rw-r--r--cpp/include/Slice/JavaUtil.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/cpp/include/Slice/JavaUtil.h b/cpp/include/Slice/JavaUtil.h
index 0817260e711..3c46358609e 100644
--- a/cpp/include/Slice/JavaUtil.h
+++ b/cpp/include/Slice/JavaUtil.h
@@ -107,7 +107,15 @@ protected:
TypeModeReturn
};
std::string typeToString(const TypePtr&, TypeMode, const std::string& = std::string(),
- const StringList& = StringList()) const;
+ const StringList& = StringList(), bool = true) const;
+
+ //
+ // Get the Java object name for a type. For primitive types, this returns the
+ // Java class type (e.g., Integer). For all other types, this function delegates
+ // to typeToString.
+ //
+ std::string typeToObjectString(const TypePtr&, TypeMode, const std::string& = std::string(),
+ const StringList& = StringList(), bool = true) const;
//
// Generate code to marshal or unmarshal a type.
@@ -152,17 +160,35 @@ protected:
const StringList& = StringList());
//
- // Find custom type metadata.
+ // Get custom type metadata. If metadata is found, the abstract and
+ // concrete types are extracted and the function returns true. If an
+ // abstract type is not specified, it is set to an empty string.
+ //
+ static bool getTypeMetaData(const StringList&, std::string&, std::string&);
+
+ //
+ // Determine whether a custom type is defined. The function checks the
+ // metadata of the type's original definition, as well as any optional
+ // metadata that typically represents a data member or parameter.
+ //
+ static bool hasTypeMetaData(const TypePtr&, const StringList& = StringList());
+
//
- // TODO: Rename to findTypeMetaData.
+ // Obtain the concrete and abstract types for a dictionary or sequence type.
+ // The functions return true if a custom type was defined and false to indicate
+ // the default mapping was used.
//
- static std::string findMetaData(const StringList&);
+ bool getDictionaryTypes(const DictionaryPtr&, const std::string&, const StringList&,
+ std::string&, std::string&) const;
+ bool getSequenceTypes(const SequencePtr&, const std::string&, const StringList&,
+ std::string&, std::string&) const;
virtual JavaOutput* createOutput();
Slice::FeatureProfile _featureProfile;
static const std::string _getSetMetaData;
+ static const std::string _java5MetaData;
private: