R
.rhavin grobert
guess you have the following:
class X {
int fn1(); // -\ lets assume those fn's
int fn2(); // >- do something independent
int fn3(); // -/ from each other
}
class Y {
public:
X& X() {return m_x;};
private:
X m_x;
};
class Z {
public:
Y& Y() {return m_y;};
private:
Y m_y;
};
_______________________________
now when i do something like this:
Z z;
CallWhateverFunctionTakingThreeInts(z.y().x().fn1,z.y().x().fn2,z.y().x().fn3);
is it as effective as writing ...
Z z;
X& x = z.y().x();
CallWhateverFunctionTakingThreeInts(x.fn1,x.fn2,x.fn3);
class X {
int fn1(); // -\ lets assume those fn's
int fn2(); // >- do something independent
int fn3(); // -/ from each other
}
class Y {
public:
X& X() {return m_x;};
private:
X m_x;
};
class Z {
public:
Y& Y() {return m_y;};
private:
Y m_y;
};
_______________________________
now when i do something like this:
Z z;
CallWhateverFunctionTakingThreeInts(z.y().x().fn1,z.y().x().fn2,z.y().x().fn3);
is it as effective as writing ...
Z z;
X& x = z.y().x();
CallWhateverFunctionTakingThreeInts(x.fn1,x.fn2,x.fn3);