L
Lars Uffmann
I've been looking into vector, deque and list documentation. None of
these have the nifty little feature that a VB collection has, and which
comes in very handy for code readability as soon as you are developing a
GUI. I'm thinking along the lines of
mywindow("lblLastChanged")->caption = "2008-01-18 14:13h";
Before I create my own template for this, based on list or vector class,
is there something that does this in any c++ libraries? I must have
missed it then.
And if there is an implementation, is it speed-optimized (with indexing
maybe)? Just so that it doesn't end up similar to the following?
element *collection::getElementByName (const char *name)
{
element *e = this->first;
do {
if (!strcmp (name, e->name))
return e;
e = e->next;
} while (e != this->first);
return NULL;
}
Thanks for any input!
Lars
these have the nifty little feature that a VB collection has, and which
comes in very handy for code readability as soon as you are developing a
GUI. I'm thinking along the lines of
mywindow("lblLastChanged")->caption = "2008-01-18 14:13h";
Before I create my own template for this, based on list or vector class,
is there something that does this in any c++ libraries? I must have
missed it then.
And if there is an implementation, is it speed-optimized (with indexing
maybe)? Just so that it doesn't end up similar to the following?
element *collection::getElementByName (const char *name)
{
element *e = this->first;
do {
if (!strcmp (name, e->name))
return e;
e = e->next;
} while (e != this->first);
return NULL;
}
Thanks for any input!
Lars