umbrello API Documentation

RubyCodeDocumentation Class Reference

class RubyCodeDocumentation A Ruby code comment. More...

#include <rubycodedocumentation.h>

Inheritance diagram for RubyCodeDocumentation:

CodeComment TextBlock List of all members.

Public Member Functions

 RubyCodeDocumentation (RubyClassifierCodeDocument *doc, const QString &text="")
 Constructors.
virtual ~RubyCodeDocumentation ()
 Empty Destructor.
virtual void saveToXMI (QDomDocument &doc, QDomElement &root)
 Save the XMI representation of this object.
QString toString ()
virtual QString unformatText (const QString &text, const QString &indent="")
 UnFormat a long text string.
virtual QString getNewEditorLine (int amount)
 a special version here because we want to not only indent the new line, but to add the "# " sequence as well.
virtual int firstEditableLine ()
 Ush.
virtual int lastEditableLine ()

Detailed Description

class RubyCodeDocumentation A Ruby code comment.

There is only a single styles of comments: these are simply started with a hash and no terminating characters

Definition at line 35 of file rubycodedocumentation.h.


Constructor & Destructor Documentation

RubyCodeDocumentation::RubyCodeDocumentation RubyClassifierCodeDocument doc,
const QString &  text = ""
[explicit]
 

Constructors.

Definition at line 35 of file rubycodedocumentation.cpp.

RubyCodeDocumentation::~RubyCodeDocumentation  )  [virtual]
 

Empty Destructor.

Definition at line 41 of file rubycodedocumentation.cpp.


Member Function Documentation

void RubyCodeDocumentation::saveToXMI QDomDocument &  doc,
QDomElement &  root
[virtual]
 

Save the XMI representation of this object.

Reimplemented from CodeComment.

Definition at line 57 of file rubycodedocumentation.cpp.

References TextBlock::setAttributesOnNode().

QString RubyCodeDocumentation::toString  )  [virtual]
 

Returns:
QString

Reimplemented from TextBlock.

Definition at line 67 of file rubycodedocumentation.cpp.

References CodeGenerationPolicy::getCommentStyle(), UMLApp::getCommonPolicy(), TextBlock::getIndentationString(), TextBlock::getText(), and TextBlock::getWriteOutText().

QString RubyCodeDocumentation::unformatText const QString &  text,
const QString &  indent = ""
[virtual]
 

UnFormat a long text string.

Typically, this means removing the indentaion (linePrefix) and/or newline chars from each line.

Reimplemented from TextBlock.

Definition at line 127 of file rubycodedocumentation.cpp.

References CodeGenerationPolicy::getCommentStyle(), UMLApp::getCommonPolicy(), and TextBlock::unformatText().

QString RubyCodeDocumentation::getNewEditorLine int  amount  )  [virtual]
 

a special version here because we want to not only indent the new line, but to add the "# " sequence as well.

Reimplemented from TextBlock.

Definition at line 99 of file rubycodedocumentation.cpp.

References CodeGenerationPolicy::getCommentStyle(), UMLApp::getCommonPolicy(), and TextBlock::getIndentationString().

int RubyCodeDocumentation::firstEditableLine  )  [virtual]
 

Ush.

These are terrifically bad and must one day go away. Both methods indicate the range of lines in this textblock which may be edited by the codeeditor (assuming that any are actually editable). The default case is no lines are editable. The line numbering starts with '0' and a '-1' means no line qualifies.

Reimplemented from TextBlock.

Definition at line 108 of file rubycodedocumentation.cpp.

References CodeGenerationPolicy::getCommentStyle(), and UMLApp::getCommonPolicy().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:08:05 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003