>----Messaggio originale----
>Da: [email protected]
>Data: 09/02/2010 7.24
>Fulvio, your comments are interesting :) And i understand your passion
>for a rewrite.
I don't know, probably it's just a fault of my terrible english.
I'll try to explain myself with an example.
The interface:
class iDatabase
{
....
std::string getFilename() const;
....
};
iDatabase* getDB(int i);
The changed sc_base_filename:
int sc_base_filename (ClientData cd, Tcl_Interp * ti, int argc, const char **
argv)
{
int baseNum = 0;
if (argc > 2) baseNum = strGetInteger (argv[2]);
iDatabase* basePtr = getDB(baseNum);
if (basePtr == 0) return errorResult (ti, "Invalid database number.");
Tcl_AppendResult (ti, basePtr->getFilename().c_str(), NULL);
return TCL_OK;
}
Bye, Fulvio
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Scid-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scid-users