Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Carbide.c++
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.nokia.carbide.cpp.epoc.engine.preprocessor
Class DefineFactory

    java.lang.Object
      com.nokia.carbide.cpp.epoc.engine.preprocessor.DefineFactory

    public abstract class DefineFactory

extends java.lang.Object

Factory providing instances of IDefine.

Constructor Summary
`DefineFactory()`

Method Summary
`static IDefine` | `createDefine(java.lang.String macroName)` Create a new argument-less macro definition whose expansion is implicitly "1"
`static IDefine` | `createDefine(java.lang.String macroName, java.lang.String expansion)` Create a new argument-less macro definition with the given expansion.
`static IDefine` | `createDefine(java.lang.String macroName, java.lang.String[] macroArgs, java.lang.String expansion)` Create a function-like macro definition with the given argument names and expansion.
`static IDefine` | `createSimpleFreeformDefine(java.lang.String macro)` Create a define from an argument-less macro definition, which may include an "=" or a space and an expansion.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefineFactory

    public DefineFactory()

Method Detail

### createDefine

    public static IDefine createDefine(java.lang.String macroName)

  Create a new argument-less macro definition whose expansion is implicitly "1"

  Parameters:
    `macroName` - macro name, e.g. "MYMAC"
  Returns:
    new IDefine
  Throws:
    `java.lang.IllegalArgumentException` - if macro name is null or invalid

### createDefine

    public static IDefine createDefine(java.lang.String macroName,
                                       java.lang.String expansion)

  Create a new argument-less macro definition with the given expansion. No newlines should be in the expansion.

  Parameters:
    `macroName` - macro name, e.g. "MYMAC"
    `macroArgs` - list of argument names, e.g. { "a", "b" }
    `expansion` - value of macro; may be null to explicitly expand to "1"
  Returns:
    new IDefine
  Throws:
    `java.lang.IllegalArgumentException` - if macro name is null or invalid

### createDefine

    public static IDefine createDefine(java.lang.String macroName,
                                       java.lang.String[] macroArgs,
                                       java.lang.String expansion)

  Create a function-like macro definition with the given argument names and expansion.

  Parameters:
    `macroName` - macro name, e.g. "MYMAC"
    `macroArgs` - list of argument names, e.g. { "a", "b" }
    `expansion` - value of macro; may be null to explicitly expand to "1"
  Returns:
    new IDefine
  Throws:
    `java.lang.IllegalArgumentException` - if macro name is null or invalid

### createSimpleFreeformDefine

    public static IDefine createSimpleFreeformDefine(java.lang.String macro)

  Create a define from an argument-less macro definition, which may include an "=" or a space and an expansion. Extra whitespace is trimmed. If no value is provided, the macro has an implicit value of "1".

  Parameters:
    `macro` - string in the form "FOO=value", "FOO value", or "MACRO"
  Returns:
    new IDefine
  Throws:
    `java.lang.IllegalArgumentException` - if macro name is null or invalid

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Carbide.c++
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD