summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-12-21 11:12:14 -0500
committerBernard Normier <bernard@zeroc.com>2007-12-21 11:12:14 -0500
commit08ec7524df324e627bbb8d93c509f0d90badbe3b (patch)
treea640ae99a5e35b210352150feef4f71832b265c5 /cpp/src/slice2java
parentMerge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff)
downloadice-08ec7524df324e627bbb8d93c509f0d90badbe3b.tar.bz2
ice-08ec7524df324e627bbb8d93c509f0d90badbe3b.tar.xz
ice-08ec7524df324e627bbb8d93c509f0d90badbe3b.zip
IceUtil cleanup (first commit)
Diffstat (limited to 'cpp/src/slice2java')
-rw-r--r--cpp/src/slice2java/.depend4
-rw-r--r--cpp/src/slice2java/Gen.cpp17
-rw-r--r--cpp/src/slice2java/Gen.h10
-rw-r--r--cpp/src/slice2java/Main.cpp16
4 files changed, 23 insertions, 24 deletions
diff --git a/cpp/src/slice2java/.depend b/cpp/src/slice2java/.depend
index 23709d55abc..9700b4b41ab 100644
--- a/cpp/src/slice2java/.depend
+++ b/cpp/src/slice2java/.depend
@@ -1,2 +1,2 @@
-Gen$(OBJEXT): Gen.cpp ../../include/IceUtil/DisableWarnings.h Gen.h ../../include/Slice/Parser.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/InputUtil.h ../../include/Slice/JavaUtil.h ../../include/IceUtil/OutputUtil.h ../../include/Slice/Checksum.h ../../include/IceUtil/Functional.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/Iterator.h
-Main$(OBJEXT): Main.cpp ../../include/IceUtil/Options.h ../../include/IceUtil/Config.h ../../include/IceUtil/RecMutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Time.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Handle.h ../../include/Slice/Preprocessor.h Gen.h ../../include/Slice/Parser.h ../../include/IceUtil/InputUtil.h ../../include/Slice/JavaUtil.h ../../include/IceUtil/OutputUtil.h ../../include/Slice/Checksum.h
+Gen$(OBJEXT): Gen.cpp ../../include/IceUtil/DisableWarnings.h ./Gen.h ../../include/Slice/Parser.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Slice/JavaUtil.h ../../include/IceUtil/OutputUtil.h ../../include/Slice/Checksum.h ../../include/IceUtil/Functional.h ../../include/IceUtil/Iterator.h
+Main$(OBJEXT): Main.cpp ../../include/IceUtil/Options.h ../../include/IceUtil/Config.h ../../include/IceUtil/RecMutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Time.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Handle.h ../../include/Slice/Preprocessor.h ./Gen.h ../../include/Slice/Parser.h ../../include/Slice/JavaUtil.h ../../include/IceUtil/OutputUtil.h ../../include/Slice/Checksum.h
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index d802e9388b0..6990c90618c 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -11,7 +11,6 @@
#include <Gen.h>
#include <Slice/Checksum.h>
#include <IceUtil/Functional.h>
-#include <IceUtil/Algorithm.h>
#include <IceUtil/Iterator.h>
#include <limits>
@@ -24,13 +23,13 @@ using namespace Slice;
// about ambigious symbols for constructs like
// "IceUtil::constMemFun(&Slice::Exception::isLocal)".
//
-using IceUtil::Output;
-using IceUtil::nl;
-using IceUtil::sp;
-using IceUtil::sb;
-using IceUtil::eb;
-using IceUtil::spar;
-using IceUtil::epar;
+using IceUtilInternal::Output;
+using IceUtilInternal::nl;
+using IceUtilInternal::sp;
+using IceUtilInternal::sb;
+using IceUtilInternal::eb;
+using IceUtilInternal::spar;
+using IceUtilInternal::epar;
static string
sliceModeToIceMode(Operation::Mode opMode)
@@ -398,7 +397,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
StringList::const_iterator firstIter = ids.begin();
StringList::const_iterator scopedIter = find(ids.begin(), ids.end(), scoped);
assert(scopedIter != ids.end());
- StringList::difference_type scopedPos = ice_distance(firstIter, scopedIter);
+ StringList::difference_type scopedPos = IceUtilInternal::distance(firstIter, scopedIter);
out << sp << nl << "public static final String[] __ids =";
out << sb;
diff --git a/cpp/src/slice2java/Gen.h b/cpp/src/slice2java/Gen.h
index 660f93d703c..38e1816c345 100644
--- a/cpp/src/slice2java/Gen.h
+++ b/cpp/src/slice2java/Gen.h
@@ -55,13 +55,13 @@ protected:
//
// Generate code to compute a hash code for a type.
//
- void writeHashCode(::IceUtil::Output&, const TypePtr&, const std::string&, int&,
+ void writeHashCode(::IceUtilInternal::Output&, const TypePtr&, const std::string&, int&,
const std::list<std::string>& = std::list<std::string>());
//
// Generate dispatch and marshalling methods for a class or interface.
//
- void writeDispatchAndMarshalling(::IceUtil::Output&, const ClassDefPtr&, bool);
+ void writeDispatchAndMarshalling(::IceUtilInternal::Output&, const ClassDefPtr&, bool);
};
class Gen : private ::IceUtil::noncopyable
@@ -245,17 +245,17 @@ private:
// Generate code to emit a local variable declaration and initialize it
// if necessary.
//
- void writeDecl(::IceUtil::Output&, const std::string&, const std::string&, const TypePtr&, const StringList&);
+ void writeDecl(::IceUtilInternal::Output&, const std::string&, const std::string&, const TypePtr&, const StringList&);
//
// Generate code to return a value.
//
- void writeReturn(::IceUtil::Output&, const TypePtr&);
+ void writeReturn(::IceUtilInternal::Output&, const TypePtr&);
//
// Generate an operation.
//
- void writeOperation(::IceUtil::Output&, const std::string&, const OperationPtr&, bool);
+ void writeOperation(::IceUtilInternal::Output&, const std::string&, const OperationPtr&, bool);
};
class ImplVisitor : public BaseImplVisitor
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp
index b52e6623d19..94e2110f5f5 100644
--- a/cpp/src/slice2java/Main.cpp
+++ b/cpp/src/slice2java/Main.cpp
@@ -48,23 +48,23 @@ usage(const char* n)
int
main(int argc, char* argv[])
{
- IceUtil::Options opts;
+ IceUtilInternal::Options opts;
opts.addOpt("h", "help");
opts.addOpt("v", "version");
- opts.addOpt("D", "", IceUtil::Options::NeedArg, "", IceUtil::Options::Repeat);
- opts.addOpt("U", "", IceUtil::Options::NeedArg, "", IceUtil::Options::Repeat);
- opts.addOpt("I", "", IceUtil::Options::NeedArg, "", IceUtil::Options::Repeat);
+ opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
+ opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
+ opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
opts.addOpt("E");
- opts.addOpt("", "output-dir", IceUtil::Options::NeedArg);
+ opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg);
opts.addOpt("", "tie");
opts.addOpt("", "impl");
opts.addOpt("", "impl-tie");
opts.addOpt("", "depend");
opts.addOpt("d", "debug");
opts.addOpt("", "ice");
- opts.addOpt("", "checksum", IceUtil::Options::NeedArg);
+ opts.addOpt("", "checksum", IceUtilInternal::Options::NeedArg);
opts.addOpt("", "stream");
- opts.addOpt("", "meta", IceUtil::Options::NeedArg, "", IceUtil::Options::Repeat);
+ opts.addOpt("", "meta", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
opts.addOpt("", "case-sensitive");
vector<string>args;
@@ -72,7 +72,7 @@ main(int argc, char* argv[])
{
args = opts.parse(argc, (const char**)argv);
}
- catch(const IceUtil::BadOptException& e)
+ catch(const IceUtilInternal::BadOptException& e)
{
cerr << argv[0] << ": " << e.reason << endl;
usage(argv[0]);