Of Ronald Andrae
Sent: 28 February 2008 18:37
Subject: [omniORB] two interfaces and factory function
Hello,
I have a IDL with a factory interface and two other interfaces,
interface User {
//...
};
interface Student : User {
//...
};
now I want to use the factory function in C++.
Student_ptr createStudent() {
Student_impl *newStudent = new Student_impl();
Student_ptr sp = newStudent->Student_impl::_this();
return sp;
}
The problem is that the "_this()" function want to use the
User class. How I can fix this problem?
What problem? Can you try to describe it a bit better? What do you mean
with "use the User class" ?
Have you defined Student_impl as a subclass of User_impl?
And why don't you simply write
Student_ptr sp = newStudent->_this(); ?
Cheers, Wernke