Skip to main content

The rtfgen.h File Reference

Included Headers

#include <array> #include "config.h" #include "outputgen.h"

Classes Index

classRTFCodeGenerator

Generator for RTF code fragments. More...

classRTFGenerator

Generator for RTF output. More...

structRTFListItemInfo

Functions Index

QCStringrtfFormatBmkStr (const QCString &name)

Functions

rtfFormatBmkStr()

QCString rtfFormatBmkStr (const QCString & name)

Declaration at line 349 of file rtfgen.h, definition at line 2870 of file rtfgen.cpp.

2871{
2872 std::lock_guard<std::mutex> lock(g_rtfFormatMutex);
2873
2874 // To overcome the 40-character tag limitation, we
2875 // substitute a short arbitrary string for the name
2876 // supplied, and keep track of the correspondence
2877 // between names and strings.
2878 auto it = g_tagMap.find(name.str());
2879 if (it!=g_tagMap.end()) // already known
2880 {
2881 return QCString(it->second);
2882 }
2883
2884 QCString tag = g_nextTag;
2885 auto result = g_tagMap.emplace(name.str(), g_nextTag.str());
2886
2887 if (result.second) // new item was added
2888 {
2889 // increment the next tag.
2890
2891 char* nxtTag = g_nextTag.rawData() + g_nextTag.length() - 1;
2892 for ( unsigned int i = 0; i < g_nextTag.length(); ++i, --nxtTag )
2893 {
2894 if ( ( ++(*nxtTag) ) > 'Z' )
2895 {
2896 *nxtTag = 'A';
2897 }
2898 else
2899 {
2900 // Since there was no carry, we can stop now
2901 break;
2902 }
2903 }
2904 }
2905
2906 Debug::print(Debug::Rtf,0,"Name = {} RTF_tag = {}\n",name,tag);
2907 return tag;
2908}

References g_nextTag, g_rtfFormatMutex, g_tagMap, Rtf_Style_Default::name, Debug::print and Debug::Rtf.

Referenced by RTFGenerator::endDoxyAnchor, objectLinkToString, RTFDocVisitor::operator(), RTFDocVisitor::operator(), RTFDocVisitor::operator(), RTFDocVisitor::operator(), RTFDocVisitor::operator(), RTFDocVisitor::startLink, RTFGenerator::startTextLink, RTFGenerator::writeAnchor, RTFCodeGenerator::writeCodeLink, RTFCodeGenerator::writeLineNumber, RTFGenerator::writeRTFReference and RTFGenerator::writeStartAnnoItem.


Generated via doxygen2docusaurus by Doxygen 1.14.0.