|
From: John P. <jo...@ma...> - 2000-10-19 02:13:37
|
I hit send by accident. The Info class should be implemented as a
map(Or a vector of maps) rather than a vector so that extra info can be
stored and retrived from this interface in the future. I can see how
dynamic interfaces may work now.
There is a stub file (perhaps defined in IDL) that exports all the
symbols for the dynamic interface. A preparser goes through this file
and constructs the infoclass and adds a method someDynamicInterface(
string method, vector params ) to the implementation file. This method
is constructed of a bunch of if statement like so:
int HelloWorld::someDynamicMethodCall( string method, vector params ){
//I'm not sure how we will do return types. Perhaps void
pointers.
method+= "_"+params.length(); //or whatever the method is.
// Note that
this signiture is only an example
// we need to
find a more unique value
if( method == "Print_1" ){ //Print method is called with 1
parameter
this->Print( dynamic_cast<string>params[0] );
} else {
return DynamicInterface::NOSUCHMETHODERROR;
}
}
The infoclass will then have information about print and how many
parameter and of what type this method takes. All objects will inherit
from DynamicInterface which exports the someDynamicMethodCall method and
all error enumerations. The Info class can now be used in an IDE to
edit object properties and generate code much like JavaBeans.
Just a thought.
I want our stuff to be compatable with the CoreLinux++ stuff so once we
hammer the details out a bit we should pass it by them and see their
thoughts on the subject.
Well that is it for now.
-John Palmieri
|