summaryrefslogtreecommitdiffstats
path: root/src/classdef.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2011-10-27 18:00:16 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2011-10-27 18:00:16 (GMT)
commit8491e9fbd06ef8a8f1cc542a524c673d7781d4b6 (patch)
tree7c1bfd20df6135fa1aac607ebe1a46d31d7f4b65 /src/classdef.cpp
parent3af6ff4c3d2748b45f468695a3db9f26eef4e630 (diff)
downloadDoxygen-8491e9fbd06ef8a8f1cc542a524c673d7781d4b6.zip
Doxygen-8491e9fbd06ef8a8f1cc542a524c673d7781d4b6.tar.gz
Doxygen-8491e9fbd06ef8a8f1cc542a524c673d7781d4b6.tar.bz2
Release-1.7.5.1-20111027
Diffstat (limited to 'src/classdef.cpp')
-rw-r--r--src/classdef.cpp76
1 files changed, 44 insertions, 32 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index f868037..4dd9860 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -175,6 +175,9 @@ class ClassDefImpl
/** Is this a simple (non-nested) C structure? */
bool isSimple;
+ /** Does this class overloaded the -> operator? */
+ MemberDef *arrowOperator;
+
ClassList *taggedInnerClasses;
ClassDef *tagLessRef;
};
@@ -217,6 +220,7 @@ void ClassDefImpl::init(const char *defFileName, const char *name,
categoryOf = 0;
usedOnly = FALSE;
isSimple = Config_getBool("INLINE_SIMPLE_STRUCTS");
+ arrowOperator = 0;
taggedInnerClasses = 0;
tagLessRef = 0;
//QCString ns;
@@ -636,6 +640,11 @@ void ClassDef::internalInsertMember(MemberDef *md,
m_impl->isAbstract=TRUE;
}
+ if (md->name()=="operator->")
+ {
+ m_impl->arrowOperator=md;
+ }
+
//::addClassMemberNameToIndex(md);
if (addToAllList &&
!(Config_getBool("HIDE_FRIEND_COMPOUNDS") &&
@@ -3175,8 +3184,35 @@ QCString ClassDef::compoundTypeString() const
}
}
-QCString ClassDef::getXmlOutputFileBase() const
-{
+QCString ClassDef::getOutputFileBase() const
+{
+ if (!Doxygen::generatingXmlOutput)
+ {
+ static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
+ static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
+ Definition *scope=0;
+ if (inlineGroupedClasses && partOfGroups()!=0)
+ {
+ // point to the group that embeds this class
+ return partOfGroups()->at(0)->getOutputFileBase();
+ }
+ else if (inlineSimpleClasses && m_impl->isSimple && partOfGroups()!=0)
+ {
+ // point to simple struct inside a group
+ return partOfGroups()->at(0)->getOutputFileBase();
+ }
+ else if (inlineSimpleClasses && m_impl->isSimple && (scope=getOuterScope()))
+ {
+ if (scope==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) // simple struct embedded in file
+ {
+ return getFileDef()->getOutputFileBase();
+ }
+ else if (scope->isLinkableInProject()) // simple struct embedded in other container (namespace/group/class)
+ {
+ return getOuterScope()->getOutputFileBase();
+ }
+ }
+ }
if (m_impl->templateMaster)
{
// point to the template of which this class is an instance
@@ -3194,35 +3230,6 @@ QCString ClassDef::getXmlOutputFileBase() const
}
}
-QCString ClassDef::getOutputFileBase() const
-{
- static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
- static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
- Definition *scope=0;
- if (inlineGroupedClasses && partOfGroups()!=0)
- {
- // point to the group that embeds this class
- return partOfGroups()->at(0)->getOutputFileBase();
- }
- else if (inlineSimpleClasses && m_impl->isSimple && partOfGroups()!=0)
- {
- // point to simple struct inside a group
- return partOfGroups()->at(0)->getOutputFileBase();
- }
- else if (inlineSimpleClasses && m_impl->isSimple && (scope=getOuterScope()))
- {
- if (scope==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) // simple struct embedded in file
- {
- return getFileDef()->getOutputFileBase();
- }
- else if (scope->isLinkableInProject()) // simple struct embedded in other container (namespace/group/class)
- {
- return getOuterScope()->getOutputFileBase();
- }
- }
- return getXmlOutputFileBase();
-}
-
QCString ClassDef::getInstanceOutputFileBase() const
{
if (isReference())
@@ -3921,6 +3928,11 @@ bool ClassDef::isSimple() const
return m_impl->isSimple;
}
+MemberDef *ClassDef::isSmartPointer() const
+{
+ return m_impl->arrowOperator;
+}
+
void ClassDef::reclassifyMember(MemberDef *md,MemberDef::MemberType t)
{
md->setMemberType(t);
@@ -3936,7 +3948,7 @@ void ClassDef::reclassifyMember(MemberDef *md,MemberDef::MemberType t)
QCString ClassDef::anchor() const
{
QCString anc;
- if (isEmbeddedInOuterScope())
+ if (isEmbeddedInOuterScope() && !Doxygen::generatingXmlOutput)
{
if (m_impl->templateMaster)
{