A Category in opC++ is an extensible redefinition of the concept of class identifiers in C++.
In C++ the only two categories were
The meanings of these categories were very limited.
Use of class means you want a c++ class, that by default will have private
inheritance and private member visibility.
category implications: private inheritance and visibility.
Use of struct means you want a c++ struct, an object type that by default
will have public inheritance and public member visibility.
category implications: public inheritance and visibility.
Categories in opC++
In opC++ the meaning behind choice of a category can go far beyond
visibility and inheritance implications. By using a category you
can control the generated code implications of an object type!
Category may affect generation in the following ways:
- May give a type additional functions or data
- May give a type external function support
- May give a type generated meta-data
- May give a type further validation restrictions