Hi Warren,
> Yes. My own code does this regularly. I don't
> understand why you bring
> _names into this at all.
My first try was to use the MYSQLPP_SSQLS_NO_STATICS
macro to avoid the _table definition. But this also
removes the _name definition part. That's why I
mentioned it.
> You simply assign the underlying SQL table
> name to MyClassName::_table early in the program's
> execution. It's no more difficult than that.
Ok, this works well. Nevertheless, from a theoretical
point of view, I would prefer not to change the value
of a static member from outside the class (even within
one of its children).
Another way (I actually use this now), is to use name
spaces. In the following example, whatever::Person is
the SSQLS structure and Person is the exported class
with all the nice method I want to have.
namespace whatever {
sql_create_1(Person,1,0,mysqlpp::sql_int,id);
};
class Person : private whatever::Person {
void NiceMethod();
void VeryCoolMethod();
};
Thanks for the response.
___________________________________________________________________________
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos
expériences.
http://fr.answers.yahoo.com