summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
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();
+}
+