opC++ Features

opC++ Compiler

opC++ Language

opGames Company

Category

category

Overview

A Category in opC++ is an extensible redefinition of the concept of class identifiers in C++.

C++ Categories

In C++ the only two categories were class and struct.

The meanings of these categories were very limited.

class

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.

struct

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
Recent Changes (All) | Edit SideBar Page last modified on May 27, 2007, at 12:00 AM Edit Page | Page History
Copyright 2010 opGames Inc.