ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PreprocessingInfo Class Reference

For preprocessing information including source comments, #include , #if, #define, etc. More...

#include <rose_attributes_list.h>

Collaboration diagram for PreprocessingInfo:

Classes

struct  r_include_directive
 
struct  r_macro_def
 
struct  rose_macro_call
 

Public Types

enum  RelativePositionType {
  defaultValue = 0,
  undef = 1,
  before = 2,
  after = 3,
  inside = 4,
  before_syntax = 6,
  after_syntax = 7
}
 MK: Enum type to store if the directive goes before or after the corresponding line of source code. More...
 
enum  DirectiveType {
  CpreprocessorUnknownDeclaration,
  C_StyleComment,
  CplusplusStyleComment,
  FortranStyleComment,
  F90StyleComment,
  CpreprocessorBlankLine,
  CpreprocessorIncludeDeclaration,
  CpreprocessorIncludeNextDeclaration,
  CpreprocessorDefineDeclaration,
  CpreprocessorUndefDeclaration,
  CpreprocessorIfdefDeclaration,
  CpreprocessorIfndefDeclaration,
  CpreprocessorIfDeclaration,
  CpreprocessorDeadIfDeclaration,
  CpreprocessorElseDeclaration,
  CpreprocessorElifDeclaration,
  CpreprocessorEndifDeclaration,
  CpreprocessorLineDeclaration,
  CpreprocessorErrorDeclaration,
  CpreprocessorWarningDeclaration,
  CpreprocessorEmptyDeclaration,
  CSkippedToken,
  CMacroCall,
  CMacroCallStatement,
  LineReplacement,
  ClinkageSpecificationStart,
  ClinkageSpecificationEnd,
  CpreprocessorIdentDeclaration,
  CpreprocessorCompilerGeneratedLinemarker,
  RawText,
  LastDirectiveType
}
 
typedef struct
PreprocessingInfo::r_include_directive 
rose_include_directive
 
typedef struct
PreprocessingInfo::r_macro_def 
rose_macro_definition
 

Public Member Functions

 ~PreprocessingInfo ()
 
 PreprocessingInfo ()
 
 PreprocessingInfo (token_container, DirectiveType, RelativePositionType)
 
 PreprocessingInfo (rose_macro_call *, RelativePositionType)
 
 PreprocessingInfo (rose_macro_definition *, RelativePositionType)
 
 PreprocessingInfo (token_type, token_list_container, bool, DirectiveType, RelativePositionType)
 
 PreprocessingInfo (rose_include_directive *, RelativePositionType)
 
 PreprocessingInfo (DirectiveType, const std::string &inputString, const std::string &filenameString, int line_no, int col_no, int nol, RelativePositionType relPos)
 
 PreprocessingInfo (const PreprocessingInfo &prepInfo)
 
void display (const std::string &label) const
 
int getLineNumber () const
 
int getColumnNumber () const
 
std::string getString () const
 
void setString (const std::string &s)
 
int getStringLength () const
 
DirectiveType getTypeOfDirective () const
 
RelativePositionType getRelativePosition (void) const
 
void setRelativePosition (RelativePositionType relPos)
 
int getNumberOfLines () const
 
int getColumnNumberOfEndOfString () const
 
unsigned int packed_size () const
 
char * packed () const
 
void unpacked (char *storePointer)
 
Sg_File_Infoget_file_info () const
 
void set_file_info (Sg_File_Info *info)
 
int get_lineNumberForCompilerGeneratedLinemarker ()
 
std::string get_filenameForCompilerGeneratedLinemarker ()
 
std::string get_optionalflagsForCompilerGeneratedLinemarker ()
 
void set_lineNumberForCompilerGeneratedLinemarker (int x)
 
void set_filenameForCompilerGeneratedLinemarker (std::string x)
 
void set_optionalflagsForCompilerGeneratedLinemarker (std::string x)
 
rose_macro_callget_macro_call ()
 
rose_macro_definitionget_macro_def ()
 
rose_include_directiveget_include_directive ()
 
const token_containerget_token_stream ()
 
void push_front_token_stream (token_type tok)
 
void push_back_token_stream (token_type tok)
 
bool isSelfReferential ()
 
std::string getMacroName ()
 

Static Public Member Functions

static std::string directiveTypeName (const DirectiveType &directive)
 
static std::string relativePositionName (const RelativePositionType &position)
 

Private Attributes

Sg_File_Infofile_info
 
std::string internalString
 
int numberOfLines
 
DirectiveType whatSortOfDirective
 
RelativePositionType relativePosition
 
int lineNumberForCompilerGeneratedLinemarker
 
std::string filenameForCompilerGeneratedLinemarker
 
std::string optionalflagsForCompilerGeneratedLinemarker
 
token_containertokenStream
 
rose_macro_definitionmacroDef
 
rose_macro_callmacroCall
 
rose_include_directiveincludeDirective
 

Detailed Description

For preprocessing information including source comments, #include , #if, #define, etc.

Definition at line 103 of file rose_attributes_list.h.

Member Typedef Documentation

Member Enumeration Documentation

MK: Enum type to store if the directive goes before or after the corresponding line of source code.

Enumerator
defaultValue 
undef 
before 
after 
inside 
before_syntax 
after_syntax 

Definition at line 109 of file rose_attributes_list.h.

Enumerator
CpreprocessorUnknownDeclaration 
C_StyleComment 
CplusplusStyleComment 
FortranStyleComment 
F90StyleComment 
CpreprocessorBlankLine 
CpreprocessorIncludeDeclaration 
CpreprocessorIncludeNextDeclaration 
CpreprocessorDefineDeclaration 
CpreprocessorUndefDeclaration 
CpreprocessorIfdefDeclaration 
CpreprocessorIfndefDeclaration 
CpreprocessorIfDeclaration 
CpreprocessorDeadIfDeclaration 
CpreprocessorElseDeclaration 
CpreprocessorElifDeclaration 
CpreprocessorEndifDeclaration 
CpreprocessorLineDeclaration 
CpreprocessorErrorDeclaration 
CpreprocessorWarningDeclaration 
CpreprocessorEmptyDeclaration 
CSkippedToken 
CMacroCall 
CMacroCallStatement 
LineReplacement 
ClinkageSpecificationStart 
ClinkageSpecificationEnd 
CpreprocessorIdentDeclaration 
CpreprocessorCompilerGeneratedLinemarker 
RawText 
LastDirectiveType 

Definition at line 130 of file rose_attributes_list.h.

Constructor & Destructor Documentation

PreprocessingInfo::~PreprocessingInfo ( )
PreprocessingInfo::PreprocessingInfo ( )
PreprocessingInfo::PreprocessingInfo ( token_container  ,
DirectiveType  ,
RelativePositionType   
)
PreprocessingInfo::PreprocessingInfo ( rose_macro_call ,
RelativePositionType   
)
PreprocessingInfo::PreprocessingInfo ( rose_macro_definition ,
RelativePositionType   
)
PreprocessingInfo::PreprocessingInfo ( token_type  ,
token_list_container  ,
bool  ,
DirectiveType  ,
RelativePositionType   
)
PreprocessingInfo::PreprocessingInfo ( rose_include_directive ,
RelativePositionType   
)
PreprocessingInfo::PreprocessingInfo ( DirectiveType  ,
const std::string &  inputString,
const std::string &  filenameString,
int  line_no,
int  col_no,
int  nol,
RelativePositionType  relPos 
)
PreprocessingInfo::PreprocessingInfo ( const PreprocessingInfo prepInfo)

Member Function Documentation

void PreprocessingInfo::display ( const std::string &  label) const
int PreprocessingInfo::getLineNumber ( ) const
int PreprocessingInfo::getColumnNumber ( ) const
std::string PreprocessingInfo::getString ( ) const
void PreprocessingInfo::setString ( const std::string &  s)
int PreprocessingInfo::getStringLength ( ) const
DirectiveType PreprocessingInfo::getTypeOfDirective ( ) const
RelativePositionType PreprocessingInfo::getRelativePosition ( void  ) const
void PreprocessingInfo::setRelativePosition ( RelativePositionType  relPos)
int PreprocessingInfo::getNumberOfLines ( ) const
int PreprocessingInfo::getColumnNumberOfEndOfString ( ) const
static std::string PreprocessingInfo::directiveTypeName ( const DirectiveType directive)
static
static std::string PreprocessingInfo::relativePositionName ( const RelativePositionType position)
static
unsigned int PreprocessingInfo::packed_size ( ) const
char* PreprocessingInfo::packed ( ) const
void PreprocessingInfo::unpacked ( char *  storePointer)
Sg_File_Info* PreprocessingInfo::get_file_info ( ) const
void PreprocessingInfo::set_file_info ( Sg_File_Info info)
int PreprocessingInfo::get_lineNumberForCompilerGeneratedLinemarker ( )
std::string PreprocessingInfo::get_filenameForCompilerGeneratedLinemarker ( )
std::string PreprocessingInfo::get_optionalflagsForCompilerGeneratedLinemarker ( )
void PreprocessingInfo::set_lineNumberForCompilerGeneratedLinemarker ( int  x)
void PreprocessingInfo::set_filenameForCompilerGeneratedLinemarker ( std::string  x)
void PreprocessingInfo::set_optionalflagsForCompilerGeneratedLinemarker ( std::string  x)
rose_macro_call* PreprocessingInfo::get_macro_call ( )
rose_macro_definition* PreprocessingInfo::get_macro_def ( )
rose_include_directive* PreprocessingInfo::get_include_directive ( )
const token_container* PreprocessingInfo::get_token_stream ( )
void PreprocessingInfo::push_front_token_stream ( token_type  tok)
void PreprocessingInfo::push_back_token_stream ( token_type  tok)
bool PreprocessingInfo::isSelfReferential ( )
std::string PreprocessingInfo::getMacroName ( )

Member Data Documentation

Sg_File_Info* PreprocessingInfo::file_info
private

Definition at line 216 of file rose_attributes_list.h.

std::string PreprocessingInfo::internalString
private

Definition at line 222 of file rose_attributes_list.h.

int PreprocessingInfo::numberOfLines
private

Definition at line 224 of file rose_attributes_list.h.

DirectiveType PreprocessingInfo::whatSortOfDirective
private

Definition at line 227 of file rose_attributes_list.h.

RelativePositionType PreprocessingInfo::relativePosition
private

Definition at line 230 of file rose_attributes_list.h.

int PreprocessingInfo::lineNumberForCompilerGeneratedLinemarker
private

Definition at line 233 of file rose_attributes_list.h.

std::string PreprocessingInfo::filenameForCompilerGeneratedLinemarker
private

Definition at line 234 of file rose_attributes_list.h.

std::string PreprocessingInfo::optionalflagsForCompilerGeneratedLinemarker
private

Definition at line 235 of file rose_attributes_list.h.

token_container* PreprocessingInfo::tokenStream
private

Definition at line 255 of file rose_attributes_list.h.

rose_macro_definition* PreprocessingInfo::macroDef
private

Definition at line 324 of file rose_attributes_list.h.

rose_macro_call* PreprocessingInfo::macroCall
private

Definition at line 326 of file rose_attributes_list.h.

rose_include_directive* PreprocessingInfo::includeDirective
private

Definition at line 328 of file rose_attributes_list.h.


The documentation for this class was generated from the following file: