[cable] Problem with static method
Anton Deguet
anton at cs.jhu.edu
Wed Apr 16 17:02:55 EDT 2003
Hello,
I have a class with some static methods:
class cisClassRegister {
static bool SetLoD(const std::string& name, const cisShort lod);
static cisShort SetLoD(cisShort lod);
}
I wrap it with Cable via the CMake ITK_WRAP_TCL command (which by the
way could be renamed CABLE_WRAP_TCL). I have a bunch of other classes
and they work great with the Tcl wrappers, but I am running into
problems with these two methods.
The test gives:
% set lod [cisClassRegister SetLoD 10]
No method matches void::SetLoD(int)
Candidates are:
static short cisClassRegister::SetLoD(short)
static bool cisClassRegister::SetLoD(const
std::basic_string<char,std::char_traits<char>,std::allocator<char> >&,
short)
Do I have a problem because these methods are static or because there is
no implicit cast from int to short. The reasons why I am confused are:
Why does it display "No method matches void::SetLoD(int)" with "void" as
the class name?
Also, it looks for a SetLoD(int), not SetLoD(short). If I try to use
the method with std::string, the interpreter looks for a method with
(char*, int).
Thanks in advance,
Anton
--
Anton Deguet - Email anton<at>cs.jhu.edu
Office NEB B26 - Phone 410 516 5261 - Fax 410 516 3332
http://cisstweb.cs.jhu.edu
More information about the cable
mailing list