A structure keeping the position of C/C++ comments in a string. More...

Public Types

enum  CommentType { CComment, CppComment }
 The possible types of comments (C or C++ style) More...
 

Public Member Functions

 CommentPosition ()
 Constructor. More...
 
 CommentPosition (unsigned int s, unsigned int e, unsigned int p, CommentType t)
 Constructor. More...
 

Public Attributes

unsigned int originalEnd
 The ending position of the comment in the original program (i.e. the position of the last character) More...
 
unsigned int originalStart
 The starting position of the comment in the original program (i.e. the position of the first character) More...
 
unsigned int parsedPosition
 The position of the space with which the comment was substituted in the parsed program. More...
 
CommentType type
 The type of comment. More...
 

Detailed Description

A structure keeping the position of C/C++ comments in a string.

This structure is used by the removeComments() function to return the position of comments both in the original and parsed program

Definition at line 52 of file farsamiscutilities.h.

Member Enumeration Documentation

The possible types of comments (C or C++ style)

Enumerator
CComment 

A C-style comment

CppComment 

A C++-style comment

Definition at line 57 of file farsamiscutilities.h.

Constructor & Destructor Documentation

CommentPosition ( )
inline

Constructor.

Definition at line 65 of file farsamiscutilities.h.

CommentPosition ( unsigned int  s,
unsigned int  e,
unsigned int  p,
CommentType  t 
)
inline

Constructor.

Parameters
sthe starting position of the comment in the original program
ethe ending position of the comment in the original program
pthe position of the space with which the comment was substituted in the parsed program
tthe type of comment

Definition at line 84 of file farsamiscutilities.h.

Member Data Documentation

unsigned int originalEnd

The ending position of the comment in the original program (i.e. the position of the last character)

Definition at line 102 of file farsamiscutilities.h.

Referenced by farsa::removeComments().

unsigned int originalStart

The starting position of the comment in the original program (i.e. the position of the first character)

Definition at line 96 of file farsamiscutilities.h.

Referenced by farsa::removeComments().

unsigned int parsedPosition

The position of the space with which the comment was substituted in the parsed program.

Definition at line 108 of file farsamiscutilities.h.

Referenced by farsa::removeComments().

The type of comment.

Definition at line 113 of file farsamiscutilities.h.

Referenced by farsa::removeComments().


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