diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2011-10-27 18:00:16 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2011-10-27 18:00:16 (GMT) |
commit | 169834ef89a1df22c8f72a01b6a9413bbb57edb5 (patch) | |
tree | 7c1bfd20df6135fa1aac607ebe1a46d31d7f4b65 /src/classdef.cpp | |
parent | 4bb56dc6ee7e5361da29a579f23c1777e4589602 (diff) | |
download | Doxygen-169834ef89a1df22c8f72a01b6a9413bbb57edb5.zip Doxygen-169834ef89a1df22c8f72a01b6a9413bbb57edb5.tar.gz Doxygen-169834ef89a1df22c8f72a01b6a9413bbb57edb5.tar.bz2 |
Release-1.7.5.1-20111027
Diffstat (limited to 'src/classdef.cpp')
-rw-r--r-- | src/classdef.cpp | 76 |
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) { |