Skip to content

Commit

Permalink
Merge branch 'master' of github.com:doxygen/doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Jul 13, 2014
2 parents d234115 + a4ef6aa commit ec77897
Show file tree
Hide file tree
Showing 39 changed files with 1,841 additions and 103 deletions.
4 changes: 3 additions & 1 deletion src/commentscan.l
Expand Up @@ -914,7 +914,9 @@ FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+@&#]
FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]*"\"")
ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]*
CITEID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-:/]*
CITESCHAR [a-z_A-Z\x80-\xFF]
CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/]*
CITEID {CITESCHAR}*{CITEECHAR}+("."{CITESCHAR}*{CITEECHAR}+)*
SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?)
SCOPENAME "$"?(({ID}?{BN}*("::"|"."){BN}*)*)((~{BN}*)?{ID})
TMPLSPEC "<"{BN}*[^>]+{BN}*">"
Expand Down
30 changes: 27 additions & 3 deletions src/context.cpp
Expand Up @@ -2766,7 +2766,11 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
addProperty("isExplicit", this,&Private::isExplicit);
addProperty("isMutable", this,&Private::isMutable);
addProperty("isGettable", this,&Private::isGettable);
addProperty("isPrivateGettable", this,&Private::isPrivateGettable);
addProperty("isProtectedGettable", this,&Private::isProtectedGettable);
addProperty("isSettable", this,&Private::isSettable);
addProperty("isPrivateSettable", this,&Private::isPrivateSettable);
addProperty("isProtectedSettable", this,&Private::isProtectedSettable);
addProperty("isReadable", this,&Private::isReadable);
addProperty("isWritable", this,&Private::isWritable);
addProperty("isAddable", this,&Private::isAddable);
Expand Down Expand Up @@ -2855,8 +2859,12 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
m_cache.propertyAttrs.reset(TemplateList::alloc());
if (md && md->isProperty())
{
if (md->isGettable()) m_cache.propertyAttrs->append("get");
if (md->isSettable()) m_cache.propertyAttrs->append("set");
if (md->isGettable()) m_cache.propertyAttrs->append("get");
if (md->isPrivateGettable()) m_cache.propertyAttrs->append("private get");
if (md->isProtectedGettable()) m_cache.propertyAttrs->append("protected get");
if (md->isSettable()) m_cache.propertyAttrs->append("set");
if (md->isPrivateSettable()) m_cache.propertyAttrs->append("private set");
if (md->isProtectedSettable()) m_cache.propertyAttrs->append("protected set");
}
m_cache.eventAttrs.reset(TemplateList::alloc());
if (md && md->isEvent())
Expand Down Expand Up @@ -2948,12 +2956,28 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
}
TemplateVariant isGettable() const
{
return m_memberDef->isSettable();
return m_memberDef->isGettable();
}
TemplateVariant isPrivateGettable() const
{
return m_memberDef->isPrivateGettable();
}
TemplateVariant isProtectedGettable() const
{
return m_memberDef->isProtectedGettable();
}
TemplateVariant isSettable() const
{
return m_memberDef->isSettable();
}
TemplateVariant isPrivateSettable() const
{
return m_memberDef->isPrivateSettable();
}
TemplateVariant isProtectedSettable() const
{
return m_memberDef->isProtectedSettable();
}
TemplateVariant isReadable() const
{
return m_memberDef->isReadable();
Expand Down
4 changes: 3 additions & 1 deletion src/doctokenizer.l
Expand Up @@ -333,7 +333,9 @@ BLANK [ \t\r]
ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]*
PHPTYPE [\\:a-z_A-Z0-9\x80-\xFF\-]+
CITEID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-:/]*
CITESCHAR [a-z_A-Z\x80-\xFF]
CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/]*
CITEID {CITESCHAR}*{CITEECHAR}+("."{CITESCHAR}*{CITEECHAR}+)*
MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+
OPTSTARS ("//"{BLANK}*)?"*"*{BLANK}*
LISTITEM {BLANK}*[-]("#")?{WS}
Expand Down
4 changes: 4 additions & 0 deletions src/entry.h
Expand Up @@ -135,6 +135,10 @@ class Entry
static const uint64 Singleton = (1ULL<<14); // UNO IDL

// member specifiers (add new items to the beginning)
static const uint64 PrivateGettable = (1ULL<<20); // C# private getter
static const uint64 ProtectedGettable = (1ULL<<21); // C# protected getter
static const uint64 PrivateSettable = (1ULL<<22); // C# private setter
static const uint64 ProtectedSettable = (1ULL<<23); // C# protected setter
static const uint64 Inline = (1ULL<<24);
static const uint64 Explicit = (1ULL<<25);
static const uint64 Mutable = (1ULL<<26);
Expand Down
46 changes: 43 additions & 3 deletions src/memberdef.cpp
Expand Up @@ -1729,15 +1729,27 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.docify(" [implementation]");
ol.endTypewriter();
}

bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");

if (isProperty() && (isSettable() || isGettable()))
if (isProperty() && (isSettable() || isGettable() ||
isPrivateSettable() || isPrivateGettable() ||
isProtectedSettable() || isProtectedGettable()))
{
ol.writeLatexSpacing();
ol.startTypewriter();
ol.docify(" [");
QStrList sl;
if (isGettable()) sl.append("get");
if (isSettable()) sl.append("set");

if (isGettable()) sl.append("get");
if (isProtectedGettable()) sl.append("protected get");
if (isSettable()) sl.append("set");
if (isProtectedSettable()) sl.append("protected set");
if (extractPrivate)
{
if (isPrivateGettable()) sl.append("private get");
if (isPrivateSettable()) sl.append("private set");
}
const char *s=sl.first();
while (s)
{
Expand Down Expand Up @@ -1940,6 +1952,7 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const
//ol.docify(" [");
SrcLangExt lang = getLanguage();
bool optVhdl = lang==SrcLangExt_VHDL;
bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
if (optVhdl)
{
sl.append(VhdlDocGen::trTypeString(getMemberSpecifiers()));
Expand All @@ -1955,7 +1968,14 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const
if (isMutable()) sl.append("mutable");
if (isStatic()) sl.append("static");
if (isGettable()) sl.append("get");
if (isProtectedGettable()) sl.append("protected get");
if (isSettable()) sl.append("set");
if (isProtectedSettable()) sl.append("protected set");
if (extractPrivate)
{
if (isPrivateGettable()) sl.append("private get");
if (isPrivateSettable()) sl.append("private set");
}
if (isAddable()) sl.append("add");
if (!isUNOProperty() && isRemovable()) sl.append("remove");
if (isRaisable()) sl.append("raise");
Expand Down Expand Up @@ -4193,11 +4213,31 @@ bool MemberDef::isGettable() const
return (m_impl->memSpec&Entry::Gettable)!=0;
}

bool MemberDef::isPrivateGettable() const
{
return (m_impl->memSpec&Entry::PrivateGettable)!=0;
}

bool MemberDef::isProtectedGettable() const
{
return (m_impl->memSpec&Entry::ProtectedGettable)!=0;
}

bool MemberDef::isSettable() const
{
return (m_impl->memSpec&Entry::Settable)!=0;
}

bool MemberDef::isPrivateSettable() const
{
return (m_impl->memSpec&Entry::PrivateSettable)!=0;
}

bool MemberDef::isProtectedSettable() const
{
return (m_impl->memSpec&Entry::ProtectedSettable)!=0;
}

bool MemberDef::isAddable() const
{
return (m_impl->memSpec&Entry::Addable)!=0;
Expand Down
4 changes: 4 additions & 0 deletions src/memberdef.h
Expand Up @@ -123,7 +123,11 @@ class MemberDef : public Definition
bool isExplicit() const;
bool isMutable() const;
bool isGettable() const;
bool isPrivateGettable() const;
bool isProtectedGettable() const;
bool isSettable() const;
bool isPrivateSettable() const;
bool isProtectedSettable() const;
bool isReadable() const;
bool isWritable() const;
bool isAddable() const;
Expand Down
4 changes: 4 additions & 0 deletions src/scanner.l
Expand Up @@ -6129,6 +6129,10 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(FindMembers);
}
}
<CSAccessorDecl>"private "{BN}*"set" { if (curlyCount==0) current->spec |= Entry::PrivateSettable; }
<CSAccessorDecl>"protected "{BN}*"set" { if (curlyCount==0) current->spec |= Entry::ProtectedSettable; }
<CSAccessorDecl>"private "{BN}*"get" { if (curlyCount==0) current->spec |= Entry::PrivateGettable; }
<CSAccessorDecl>"protected "{BN}*"get" { if (curlyCount==0) current->spec |= Entry::ProtectedGettable; }
<CSAccessorDecl>"set" { if (curlyCount==0) current->spec |= Entry::Settable; }
<CSAccessorDecl>"get" { if (curlyCount==0) current->spec |= Entry::Gettable; }
<CSAccessorDecl>"add" { if (curlyCount==0) current->spec |= Entry::Addable; }
Expand Down

0 comments on commit ec77897

Please sign in to comment.