![]() |
|
Declaration object for preprocessor macros. More...
#include <cmacro.h>
Public Member Functions | |
| CMacro (CSymbol *aSymbol, Coord_t *aLoc) | |
| Create a macro declaration object. | |
| virtual CDecl * | Clone (CObstack *heap) |
| Create a clone of this declaration. | |
| char * | GetBody (void) |
| Get body of macro. | |
| void | SetBody (char *aBody) |
| Set body of macro. | |
| int | GetZone (void) |
| Get preprocessor zone number for last macro definition. | |
| void | SetZone (int aZone) |
| Set preprocessor zone number. | |
| void | SetComplex (int aComplex) |
| Set complex flag. | |
| int | IsComplex (void) |
| Get complex flag. | |
| char ** | GetArgList (void) |
| Get macro arguments. | |
| void | SetArgList (char **argList) |
| Set macro arguments. | |
| virtual void | Dump (FILE *f) |
| Dump macro info to file descriptor. | |
| int | IsDefined (void) |
| Get defined flag. | |
| void | SetDefined (int aDefined) |
| Set defined flag. | |
Static Public Member Functions | |
| static CMacro * | LookupMacro (const char *aName) |
| Find macro definition. | |
Protected Member Functions | |
| void | Copy (CObstack *heap, CMacro &d) |
| Deep copy of declaration. | |
Declaration object for preprocessor macros.
| CMacro::CMacro | ( | CSymbol * | aSymbol, |
| Coord_t * | aLoc | ||
| ) |
Create a macro declaration object.
| aSymbol | name of macro. |
| aLoc | file coordinate of definition. |
| virtual CDecl* CMacro::Clone | ( | CObstack * | heap | ) | [virtual] |
Create a clone of this declaration.
| heap | heap to use for allocation. |
Implements CDecl.
| void CMacro::Copy | ( | CObstack * | heap, |
| CMacro & | d | ||
| ) | [protected] |
Deep copy of declaration.
| heap | heap to use for allocation. |
| d | declaration to copy. |
| virtual void CMacro::Dump | ( | FILE * | f | ) | [virtual] |
| char** CMacro::GetArgList | ( | void | ) |
Get macro arguments.
| char* CMacro::GetBody | ( | void | ) |
Get body of macro.
| int CMacro::GetZone | ( | void | ) | [inline] |
Get preprocessor zone number for last macro definition.
| int CMacro::IsComplex | ( | void | ) |
Get complex flag.
| int CMacro::IsDefined | ( | void | ) |
Get defined flag.
| static CMacro* CMacro::LookupMacro | ( | const char * | aName | ) | [static] |
Find macro definition.
Create an undefined entry if it doesn't exist.
| aName | char pointer to macro name. |
| void CMacro::SetArgList | ( | char ** | argList | ) |
Set macro arguments.
| argList | pointer to array of macro arguments. Array is not copied. |
| void CMacro::SetBody | ( | char * | aBody | ) |
Set body of macro.
| aBody | body of macro. |
| void CMacro::SetComplex | ( | int | aComplex | ) |
Set complex flag.
| aComplex | non-zero if macro has arguments. |
| void CMacro::SetDefined | ( | int | aDefined | ) |
Set defined flag.
| aDefined | non-zero if macro has been defined. |
| void CMacro::SetZone | ( | int | aZone | ) | [inline] |
Set preprocessor zone number.
| aZone | preprocessor zone number. |
1.7.6.1