Re: [pygccxml-development] Current Vector Indexing Suite
Brought to you by:
mbaas,
roman_yakovenko
|
From: Roman Y. <rom...@gm...> - 2006-06-24 17:45:47
|
On 6/24/06, Lakin Wecker <lak...@gm...> wrote:
> In order to handle the situation of a class that is missing operator==, but
> is being exported using the current vector indexing suite, I wrote something
> which writes code similar to:
>
> inline bool
> operator==(::Ogre::CompositorInstance::TargetOperation lhs,
> ::Ogre::CompositorInstance::TargetOperation rhs) {
> throw
> std::runtime_error("::Ogre::CompositorInstance::TargetOperation
> has no comparison operator.");
> }
>
> for each class. This file is then included in the pyplusplus generated
> code. From my understanding of C++, this should be enough. However, I
> still get the same compiler error. If I add the appropriate member function
> directly to class' header file, the generated code compiles.
>
> What am I missing?
I think scope. Compiler does not look for operator== where you think
it looks for.
I am afraid, that for classes that defined within other classes you don't have
solution. ( I hope somebody will say that I am wrong and show the solution ).
For classes that defined in the namespace, you can define operator==
in that namespace.
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|