summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-12-05 22:54:38 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-12-12 19:13:02 (GMT)
commit6dbf32d505d5c9e628474fb83e379b2646d24d3f (patch)
treee0b98894b91f0151f10136f50d42feb5d6a7dc1b /src/util.cpp
parent4d5ddf7777b833969eeac30ee313484eb259f751 (diff)
downloadDoxygen-6dbf32d505d5c9e628474fb83e379b2646d24d3f.zip
Doxygen-6dbf32d505d5c9e628474fb83e379b2646d24d3f.tar.gz
Doxygen-6dbf32d505d5c9e628474fb83e379b2646d24d3f.tar.bz2
More template and context enhancements
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 202ba82..42bf819 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -8057,3 +8057,26 @@ bool classVisibleInIndex(ClassDef *cd)
return (allExternals && cd->isLinkable()) || cd->isLinkableInProject();
}
+//----------------------------------------------------------------------------
+
+QCString extractDirection(QCString &docs)
+{
+ QRegExp re("\\[[^\\]]+\\]"); // [...]
+ int l=0;
+ if (re.match(docs,0,&l)==0)
+ {
+ int inPos = docs.find("in", 1,FALSE);
+ int outPos = docs.find("out",1,FALSE);
+ bool input = inPos!=-1 && inPos<l;
+ bool output = outPos!=-1 && outPos<l;
+ if (input || output) // in,out attributes
+ {
+ docs = docs.mid(l); // strip attributes
+ if (input && output) return "[in,out]";
+ else if (input) return "[in]";
+ else if (output) return "[out]";
+ }
+ }
+ return QCString();
+}
+