No Richard..The earlier question was for "curve"... And this one is for "surface". which is pretty complex than Curve.
SSETH
Posts
-
Beizier surface -
Beizier surfaceMy earlier question is completely different than this one.. Thanks.
-
How to design the accessibility problemThanks for respond ..I dont know if you are really getting the what exactly I am trying to target in the code.. without friend and making public accessibility I want to restrict the permission to some particular user... The way I am achieving is just one of the use case of Private Inheritance.. Could you please post here your approach(Design) in C++.. Thanks in advance..
-
How to design the accessibility problemclass AccountInterface
{
public :
virtual void CheckAccount() = 0;
};class Accountant
{
private:
AccountInterface * accountDept;
public:
Accountant():accountDept(NULL){}
void SetCompanyAccDept(AccountInterface *accDept){accountDept = accDept;}void AuditCompany() { if (accountDept) accountDept->CheckAccount(); else printf("Compnay info not set"); }
};
class company : private AccountInterface
{
private:
virtual void CheckAccount()
{
printf("Only Granted Accountant should have access to this");
}
public:
void SetAccuntant(Accountant *accountant)
{
//Based on some logic grant access
accountant->SetCompanyAccDept(this);
}
};int main (int argc, char *argv[])
{
company c1;
Accountant ac1;
c1.SetAccuntant(&ac1);
ac1.AuditCompany();}
I tried to demonstrate the idea with a company its account deptartment and an accountant. Account Details should not be public. (no Public access) The Accountant should not be able to access other details of the company ( No friend) Company is responsible for granting access permission --Private Inheritance..( is a relationship with base class but no exposed to public) Thanks, SSETH
-
Beizier surfaceHi, Given a set of points data, does any one know how to formulate Bezier Spline surface. Thanks in advance. SSETH
-
Piece wise Bezier Spline curveCan any one suggest how to create C2 continuous piece wise Bezier spline curve with vector method? Thanks in advance. ~SSETH
-
How to design the accessibility problemHello All, Could any one suggest how can I design the following the problem in C++? How to provide access to a component of a Class to some third person. The constraints are 1. The third person should not be able to see the other details of the class! 2. the component should be accessible to only that particular third person! I have a solution to the problem. But I would like to know other approaches to solve the issue. Thanks in advance ~SSETH