P
pauldepstein
Class A has two constructors A( someclass& asomeclassvar,
someotherclass& asomeotherclassvar) and also A(someclass&
asomeclassvar, someotherclass& asomeotherclassvar, yetanotherclass&
ayetanotherclassvar) Get and Set methods are available for the
parameters from someclass, someotherclass and yetanother class.
Sometimes these Get and Set Methods are accessed from a base
class
I want to write code like:
A* NewPointerToClass = new(PreviouslyDefinedPointerToMyClass ->
Getasomeclassvar(), PreviouslyDefinedPointerToMyClass-
My problem is that I don't know which of the two possible constructors
is available via PreviouslyDefinedPointerToMyClass
I only want to call a Get method if it corresponds to a variable
that's present in the constructor.
So it seems like I need to know how to say, in c++
if(the thing being pointed to has been defined using such and such a
constructor) do...
else if the thing being pointed to has been defined using such and
such a constructor) do...
I would guess this is a common situation in c++ What is the most
standard way of handling this?
Thank you very much for your help
Paul Epstein
someotherclass& asomeotherclassvar) and also A(someclass&
asomeclassvar, someotherclass& asomeotherclassvar, yetanotherclass&
ayetanotherclassvar) Get and Set methods are available for the
parameters from someclass, someotherclass and yetanother class.
Sometimes these Get and Set Methods are accessed from a base
class
I want to write code like:
A* NewPointerToClass = new(PreviouslyDefinedPointerToMyClass ->
Getasomeclassvar(), PreviouslyDefinedPointerToMyClass-
Getsomeotherclassvar ..);
My problem is that I don't know which of the two possible constructors
is available via PreviouslyDefinedPointerToMyClass
I only want to call a Get method if it corresponds to a variable
that's present in the constructor.
So it seems like I need to know how to say, in c++
if(the thing being pointed to has been defined using such and such a
constructor) do...
else if the thing being pointed to has been defined using such and
such a constructor) do...
I would guess this is a common situation in c++ What is the most
standard way of handling this?
Thank you very much for your help
Paul Epstein