Defining an option parsing subclass

<optclass name="testoptions">

  <superclasses>public testoptions_superclass</superclasses>

  <constructorargs>int argc, char **argv</constructorargs>

  <superclass_init>testoptions_superclass(argc, argv, msgcat)</superclass_init>

// ...

These three elements assist in generating an option parsing class that's derived from some other superclass. The above three elements generate the following class definition:

class testoptions : public testoptions_superclass {

public:

// ...
      testoptions(int argc, char **argv,
                  const x::wmessagesptr &msgcat=x::wmessagesptr())
          : testoptions_superclass(argc, argv, msgcat),
            // ...

These three optional elements get inserted, pretty much verbatim, as is, in the appropriate places noted in the above example (the definition of msgcat gets inserted by the option parser generator; its described in the section called “Localizing option strings”).