Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Private Attributes
CppImport::Comment Class Reference

Public Member Functions

 Comment (clang::RawComment *rawComment, const clang::SourceManager &sourceManager)
 
QString fileName ()
 the presumed file name where this comment is located. More...
 
void insertIntoItemList (OOModel::StatementItemList *itemList, int index=-1)
 associates the comment with the provided item list and creates a comment statement as a child of the list at the provided index (by default at the end of the list). More...
 
unsigned lineEnd ()
 the presumed line this comment ends on. More...
 
unsigned lineStart ()
 the presumed line this comment starts on. More...
 
Model::Nodenode ()
 the node this comment is associated with. More...
 
clang::RawComment * rawComment ()
 
void removeFromItemList ()
 rolls back the association made by a previous call to 'insertIntoItemList'. More...
 
void setNode (Model::Node *node)
 associates the comment with a node. More...
 
QString text ()
 the raw text of this comment. More...
 

Private Attributes

OOModel::CommentStatementItemcommentStatementItem_ {}
 this field is used to roll back associations made using 'insertIntoItemList'. More...
 
QString fileName_
 
unsigned lineEnd_ {}
 
unsigned lineStart_ {}
 
Model::Nodenode_ {}
 
clang::RawComment * rawComment_ {}
 
QString text_
 

Constructor & Destructor Documentation

◆ Comment()

CppImport::Comment::Comment ( clang::RawComment *  rawComment,
const clang::SourceManager &  sourceManager 
)

Member Function Documentation

◆ fileName()

QString CppImport::Comment::fileName ( )
inline

the presumed file name where this comment is located.

◆ insertIntoItemList()

void CppImport::Comment::insertIntoItemList ( OOModel::StatementItemList itemList,
int  index = -1 
)

associates the comment with the provided item list and creates a comment statement as a child of the list at the provided index (by default at the end of the list).

the association created by this method can later be rolled back by a call to 'removeFromItemList'.

◆ lineEnd()

unsigned CppImport::Comment::lineEnd ( )
inline

the presumed line this comment ends on.

◆ lineStart()

unsigned CppImport::Comment::lineStart ( )
inline

the presumed line this comment starts on.

◆ node()

Model::Node * CppImport::Comment::node ( )
inline

the node this comment is associated with.

◆ rawComment()

clang::RawComment * CppImport::Comment::rawComment ( )
inline

◆ removeFromItemList()

void CppImport::Comment::removeFromItemList ( )

rolls back the association made by a previous call to 'insertIntoItemList'.

◆ setNode()

void CppImport::Comment::setNode ( Model::Node node)

associates the comment with a node.

◆ text()

QString CppImport::Comment::text ( )

the raw text of this comment.

Member Data Documentation

◆ commentStatementItem_

OOModel::CommentStatementItem* CppImport::Comment::commentStatementItem_ {}
private

this field is used to roll back associations made using 'insertIntoItemList'.

◆ fileName_

QString CppImport::Comment::fileName_
private

◆ lineEnd_

unsigned CppImport::Comment::lineEnd_ {}
private

◆ lineStart_

unsigned CppImport::Comment::lineStart_ {}
private

◆ node_

Model::Node* CppImport::Comment::node_ {}
private

◆ rawComment_

clang::RawComment* CppImport::Comment::rawComment_ {}
private

◆ text_

QString CppImport::Comment::text_
private