summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Operation.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-09-03 22:10:30 +0000
committerMark Spruiell <mes@zeroc.com>2004-09-03 22:10:30 +0000
commita7dad57c553430519573cd808b326126d4affffb (patch)
tree9ee6aba6d6f03cf6feb8b08cae6382b294682355 /py/modules/IcePy/Operation.cpp
parentRenamed IceInternal.Connection to Ice.ConnectionI (diff)
downloadice-a7dad57c553430519573cd808b326126d4affffb.tar.bz2
ice-a7dad57c553430519573cd808b326126d4affffb.tar.xz
ice-a7dad57c553430519573cd808b326126d4affffb.zip
type refactoring
Diffstat (limited to 'py/modules/IcePy/Operation.cpp')
-rw-r--r--py/modules/IcePy/Operation.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/py/modules/IcePy/Operation.cpp b/py/modules/IcePy/Operation.cpp
new file mode 100644
index 00000000000..30aeba3431c
--- /dev/null
+++ b/py/modules/IcePy/Operation.cpp
@@ -0,0 +1,42 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Operation.h>
+#include <Types.h>
+#include <Util.h>
+
+using namespace std;
+using namespace IcePy;
+
+IcePy::Operation::~Operation()
+{
+}
+
+IcePy::OperationPtr
+IcePy::getOperation(const string& classId, const string& name)
+{
+ OperationPtr result;
+
+ ClassInfoPtr info = ClassInfoPtr::dynamicCast(getTypeInfo(classId));
+ if(info)
+ {
+ result = info->findOperation(name);
+ if(!result)
+ {
+ //
+ // Look for the operation in the description of Ice.Object.
+ //
+ info = ClassInfoPtr::dynamicCast(getTypeInfo("::Ice::Object"));
+ assert(info);
+ result = info->findOperation(name);
+ }
+ }
+
+ return result;
+}