Package org.eigenbase.resgen

## Class CppGenerator

- java.lang.Object
- - org.eigenbase.resgen.AbstractGenerator
  - - org.eigenbase.resgen.CppGenerator

All Implemented Interfaces:
  `Generator`

Direct Known Subclasses:
  `CppHeaderGenerator`

    class CppGenerator
    extends AbstractGenerator

Generates a C++ class containing resource definitions.

Since:
  19 September, 2005
Version:
  $Id: //open/util/resgen/src/org/eigenbase/resgen/CppGenerator.java#3 $
Author:
  jhyde

### Constructor Summary

Constructors
`CppGenerator​(java.io.File srcFile, java.io.File file, java.lang.String className, java.lang.String baseClassName, java.lang.String defaultExceptionClassName, java.lang.String headerFilename)` Creates a C++ header generator.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `generateModule​(ResourceGen generator, ResourceDef.ResourceBundle resourceList, java.io.PrintWriter pw)` Generates a class containing a line for each resource.
`void` `generateResource​(ResourceDef.Resource resource, java.io.PrintWriter pw)` Generates code for a particular resource.
`protected java.lang.String[]` `getArgTypes​(java.lang.String message)` Returns the number and types of parameters in the given error message, expressed as an array of Strings (legal values are currently "String", "Number", "java.util.Date", and null) ordered by parameter number.
`protected java.lang.String` `getBaseClassName()` Returns the fully-qualified name of the base class.
`protected java.lang.String` `getClassName()` Returns the fully-qualified name of the class being generated, for example "happy.BirthdayResource_en_US".

### Methods inherited from class org.eigenbase.resgen.AbstractGenerator

`generateDoNotModifyHeader, generateGeneratedByBlock, getArgumentList, getFile, getParameterList, getSrcFileForComment, setScmSafeComments, useScmSafeComments`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CppGenerator

    CppGenerator​(java.io.File srcFile,
                 java.io.File file,
                 java.lang.String className,
                 java.lang.String baseClassName,
                 java.lang.String defaultExceptionClassName,
                 java.lang.String headerFilename)

Creates a C++ header generator.

Parameters:
  `srcFile` -
  `file` -
  `className` -
  `baseClassName` - Name of base class, must not be null, typically
  `defaultExceptionClassName` -

### Method Detail

#### getClassName

    protected java.lang.String getClassName()

Description copied from class: `AbstractGenerator`
Returns the fully-qualified name of the class being generated, for example "happy.BirthdayResource_en_US".

Specified by:
  `getClassName` in class `AbstractGenerator`

#### getBaseClassName

    protected java.lang.String getBaseClassName()

Description copied from class: `AbstractGenerator`
Returns the fully-qualified name of the base class.

Specified by:
  `getBaseClassName` in class `AbstractGenerator`

#### getArgTypes

    protected java.lang.String[] getArgTypes​(java.lang.String message)

Description copied from class: `AbstractGenerator`
Returns the number and types of parameters in the given error message, expressed as an array of Strings (legal values are currently "String", "Number", "java.util.Date", and null) ordered by parameter number.

Specified by:
  `getArgTypes` in class `AbstractGenerator`

#### generateModule

    public void generateModule​(ResourceGen generator,
                               ResourceDef.ResourceBundle resourceList,
                               java.io.PrintWriter pw)

Description copied from interface: `Generator`
Generates a class containing a line for each resource.

#### generateResource

    public void generateResource​(ResourceDef.Resource resource,
                                 java.io.PrintWriter pw)

Description copied from class: `AbstractGenerator`
Generates code for a particular resource.

Specified by:
  `generateResource` in class `AbstractGenerator`