Re: help with automatic code generation
- From: "Rob Thorpe" <rthorpe@xxxxxxxxxxxxxxxxx>
- Date: 31 Jan 2007 03:14:42 -0800
On Jan 31, 5:29 am, "JoshforRefugee" <anki...@xxxxxxxxx> wrote:
This is not more of a C++/code question, it is more like OOP question.
But as I mentioned above, I am trying to figure out way to register
construction and register few method in class with my env class. Now,
my question is can I do this with macros? if yes can you someone can
give me some pseudo code or some idea on how to do this..I am actually
blank and think that it is not possible since you have to append this
methods in your env class all the time, and not sure I can do that in C
++.
so if my env already has
myA.reset();
myB.reset();
myA.execute();
myB.execute()
I have to append myC so that
myA.reset();
myB.reset();
myC.reset()
myA.execute();
myB.execute();
myC.execute();
if macros are not right way to do this..what else are my options?
think macros are the right way to solve it.From the brief description you have given of your problem I don't
Generally in an object-orientated program there is a tree of objects.
This tree is somewhat similar to a family tree showing the evolution
of various organisms. There is a root class which has certain
properties, then there are classes decended from it which have
slightly different properties. Probably the correct way to solve your
problem is to make the methods of your class "reset", "execute" etc
common to some root class.
If this does not solve your problem, then please write a longer
description of the problem.
(And, as CBF said, please learn how to quote articles)
.
- References:
- help with automatic code generation
- From: JoshforRefugee
- Re: help with automatic code generation
- From: Willem
- Re: help with automatic code generation
- From: JoshforRefugee
- Re: help with automatic code generation
- From: JoshforRefugee
- Re: help with automatic code generation
- From: Arthur J. O'Dwyer
- Re: help with automatic code generation
- From: JoshforRefugee
- help with automatic code generation
- Prev by Date: Re: help with automatic code generation
- Next by Date: Re: help with automatic code generation
- Previous by thread: Re: help with automatic code generation
- Next by thread: Re: help with automatic code generation
- Index(es):
Relevant Pages
|