<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
I have defined,<br>
<br>
class Student_impl : public POA_Student, public User_impl {<br>
//..<br>
}<br>
<br>
when I use "_this()" in the factory function, I get an error that the
compiler has a multiple choise.<br>
<br>
Wernke Zur Borg schrieb:
<blockquote
cite="mid:7149796D3C44874AA501840BD72E576C02488E1C@zaphod.vegagroup.net"
type="cite">
<blockquote type="cite">
<pre wrap="">Of Ronald Andrae
Sent: 28 February 2008 18:37
To: <a class="moz-txt-link-abbreviated" href="mailto:omniorb-list@omniorb-support.com">omniorb-list@omniorb-support.com</a>
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?
</pre>
</blockquote>
<pre wrap=""><!---->
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
</pre>
</blockquote>
</body>
</html>