How is something like this setup?
I have a bunch of functions in this class like
AClass->Func()
and I want to organize them.
AClass->Mask::Func()
How do I do that? Would I just put Func() in a static class inside AClass?
Printable View
How is something like this setup?
I have a bunch of functions in this class like
AClass->Func()
and I want to organize them.
AClass->Mask::Func()
How do I do that? Would I just put Func() in a static class inside AClass?
If you have that many functions in your AClass class I think it's time you rethink your design...
Well they are all virtual and splitting the class would become a headache for setting them all.Quote:
Originally Posted by McCain
Right now I am doing.
Probably will change "TextClass" to "TEXT".Code:class TextClass
{
};
TextClass Text;
also there aren't that many functions, I just want them more organized.
I don't get how you could separate them nicely.
I mean, the user currently accesses them like.
Code:void OnReceiveText(InsimInterface::TextClass::ReceiveTextStruct rts)
{
}
Insim->Text.OnReceiveText(&OnReceiveText);
That really isn't a suggestion to how to improve so... What would you suggest I do?Quote:
Originally Posted by McCain
From the look of your reply it seems like you're designing some kind of library or something. This is always hard and requires you to have a good idea of how it should all look and work before you start coding.
From your original example I would suggest you create the (separate) class AMaskClass instead of having the class Mask inside AClass.