Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting back the percent of done work

Status
Not open for further replies.

IonelBurtan

Programmer
May 25, 2001
601
RO
I have a class, which is not derived from any other(Generic class)

Inside it, i have a mai loop of execution(a while).
I want to be able to "know" the percent done from outside the class object, without having to pass a calling-class object pointer.

This is because the class objects may be called from different types of objects.

any ideas?
I have a few, but i am not quite sure about them :|

tnx

s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Could you please be a bit more specific?

Ion Filipski
1c.bmp
 
for example:

I have three classes
ClassA a;
ClassB b;
ClassLoop c;

both a and b have a function called execute like this
ClassA::Execute()
{
ClassLoop c;
}

ClassLoop main function look like this :
for (i=0;i<constant;i++)
{
.. do something -> comunicate parent the perncent done how?
}

now I have 2 situations like this:

ClassA a;
a.Execute();

ClassB b;
b.Execute();

I need somehow to know inside a and b the percent done from c object.


s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
I solved it by deriving both a and b from a base class C and passing a pointet of type C to the ClassLoop object
Tnx anyway.

s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top