Re: The XServiceInfo interface ...



Hi Michael,

> ... I think in general mangling
> random letters at the front of interface names is not a good thing :-)
> Perhaps if all code generating interfaces began with 'X' ( why X ? ) and
> all services were plain, then grokking the idl would be easier. But this
> is not the case; either way it's not a big complaint :-)

why 'X', I don't know anymore. Microsoft started with 'I' and somehow we 
chose 'X' to be different. And yes, ALL an ONLY our code generating 
interfaces start with this prefix. Or what do you mean? Although UNO has 
runtime code generation anyway. But that's a different story.

>         So, these names are in a different namespace then, oh well. 

For the implementation yes, but it makes documentation generation a lot 
easier, of names cannot clash even for services vs. interfaces: We just 
create files like "com/sun/star/text/XTextField.html" and 
"com/sun/star/text/TextField.html" for example. And all automatically 
generated links (from syntactical information) are very straight forward. 
If both were "TextField", we had a problem here.

> Tell
> me; is the getImplementationName () method used for anything but 
debugging
> ? it seems to me rather strange to allow people to break past the
> query interface abstraction and behave differently with specific objects
> with different implementations; or did I mistake what that method
> does. 

True, it is mostly used for debugging and testing. We need to know, which 
implementation gets tested to address the right person for the bug report ;-)

> Also, does every object implement this XServiceInfo interface, and
> how does your C++ sugar help people do that ? or is it a relatively rare
> interface ?

Yes, XServiceInfo should be implementation by virtually all objects. It 
does not need to be implementated by objects which are only existent in a 
very limited context or for example just for offering callback 
functionality (being themselves registered as a listener). There is 
currently no sugar (I like that term) for the XServiceInfo interface, but 
it's easy to type down and the developer has to be aware of the services 
which are supported by it's implementation anyway.

	Michael




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]