reland fix picture subclass destructor doc
Failure to fully parse subclass destructor caused bookmaker to drop everything that followed. Fix it, and look for subclass constructors more thoroughly. Fixed ints that should have been size_t that broke the build the first time. Its weird that the trybot CL didn't catch this. TBR=caryclark@google.com Docs-Preview: https://skia.org/?cl=152666 Bug: skia:6898 Change-Id: Id2ec0e96e71c371c97f344f9e116be211fd220bc Reviewed-on: https://skia-review.googlesource.com/152666 Commit-Queue: Cary Clark <caryclark@google.com> Auto-Submit: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
This commit is contained in:
parent
eb50f434f0
commit
a8cdc176c6
@ -315,7 +315,7 @@ Returns Region if set; otherwise, returns nullptr.
|
||||
#Code
|
||||
class SK_API Cliperator {
|
||||
public:
|
||||
Cliperator(const SkRegion&, const SkIRect& clip);
|
||||
Cliperator(const SkRegion& region, const SkIRect& clip);
|
||||
bool done();
|
||||
void next();
|
||||
const SkIRect& rect() const;
|
||||
|
@ -129,7 +129,7 @@ SkPicture::AbortCallback can be constructed or initialized by these functions, i
|
||||
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>defines default constructor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '></td>
|
||||
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPicture_AbortCallback_destructor'>~AbortCallback()</a></td>
|
||||
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>defines default destructor</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -155,7 +155,9 @@ SkPicture::AbortCallback member functions read and modify the structure properti
|
||||
class <a href='#SkPicture_AbortCallback_AbortCallback'>AbortCallback</a> {
|
||||
public:
|
||||
<a href='#SkPicture_AbortCallback_AbortCallback'>AbortCallback()</a> {}
|
||||
virtual
|
||||
virtual <a href='#SkPicture_AbortCallback_destructor'>~AbortCallback()</a> {}
|
||||
virtual bool <a href='#SkPicture_AbortCallback_abort'>abort</a> = 0;
|
||||
};
|
||||
</pre>
|
||||
|
||||
<a href='#SkPicture_AbortCallback_AbortCallback'>AbortCallback</a> is an abstract class. An implementation of <a href='#SkPicture_AbortCallback_AbortCallback'>AbortCallback</a> may
|
||||
@ -187,7 +189,7 @@ abstract class cannot be instantiated
|
||||
## ~AbortCallback
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
|
||||
virtual
|
||||
virtual <a href='#SkPicture_AbortCallback_destructor'>~AbortCallback</a>()
|
||||
</pre>
|
||||
|
||||
Has no effect.
|
||||
|
@ -663,7 +663,7 @@ SkRegion::Cliperator member functions read and modify the structure properties.
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
class SK_API <a href='#SkRegion_Cliperator'>Cliperator</a> {
|
||||
public:
|
||||
<a href='#SkRegion_Cliperator'>Cliperator(const SkRegion&, const SkIRect& clip)</a>;
|
||||
<a href='#SkRegion_Cliperator_const_SkRegion_const_SkIRect'>Cliperator(const SkRegion& region, const SkIRect& clip)</a>;
|
||||
bool <a href='#SkRegion_Cliperator_done'>done</a>;
|
||||
void <a href='#SkRegion_Cliperator_next'>next</a>;
|
||||
const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& <a href='#SkRegion_Cliperator_rect'>rect</a> const;
|
||||
|
@ -62,21 +62,12 @@ there is special case code to skip phrase def when looking for additional substi
|
||||
phrase def. Could put it in the token list instead I guess, or make a definition subclass used
|
||||
by phrase def with an additional slot...
|
||||
|
||||
#Deprecated soon
|
||||
##
|
||||
should emit the text "To be deprecated soon." (right now you get just "soon")
|
||||
|
||||
SkCanvas_ColorBehavior_kLegacy missing </table> in md out
|
||||
|
||||
rearrange const out for md so that const / value / short description comes first in a table,
|
||||
followed by more elaborate descriptions, examples, seealso. In md.cpp, look to see if #Subtopic
|
||||
has #Const children. If so, generate a summary table first.
|
||||
Or, only allow #Line and moderate text description in #Const. Put more verbose text, example,
|
||||
seealso, in subsequent #SubTopic. Alpha_Type does this and it looks good.
|
||||
|
||||
picture reference subclass AbortCallback has empty subtopics, and fails to show the full
|
||||
prototype for ~AbortCallback in the md out generation.
|
||||
|
||||
see head of selfCheck.cpp for additional todos
|
||||
see head of spellCheck.cpp for additional todos
|
||||
*/
|
||||
|
@ -2365,7 +2365,13 @@ public:
|
||||
MethodParser(string className, string fileName,
|
||||
const char* start, const char* end, int lineCount)
|
||||
: TextParser(fileName, start, end, lineCount)
|
||||
, fClassName(className) {
|
||||
, fClassName(className)
|
||||
, fLocalName(className) {
|
||||
size_t doubleColons = className.find_last_of("::");
|
||||
if (string::npos != doubleColons) {
|
||||
fLocalName = className.substr(doubleColons + 1);
|
||||
SkASSERT(fLocalName.length() > 0);
|
||||
}
|
||||
}
|
||||
|
||||
~MethodParser() override {}
|
||||
@ -2384,18 +2390,18 @@ public:
|
||||
if (this->eof()) {
|
||||
return;
|
||||
}
|
||||
if (fClassName.length()) {
|
||||
if (fLocalName.length()) {
|
||||
if ('~' == this->peek()) {
|
||||
this->next();
|
||||
if (!this->startsWith(fClassName.c_str())) {
|
||||
if (!this->startsWith(fLocalName.c_str())) {
|
||||
--fChar;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (BmhParser::Resolvable::kSimple != resolvable
|
||||
&& (this->startsWith(fClassName.c_str()) || this->startsWith("operator"))) {
|
||||
&& (this->startsWith(fLocalName.c_str()) || this->startsWith("operator"))) {
|
||||
const char* ptr = this->anyOf("\n (");
|
||||
if (ptr && '(' == *ptr) {
|
||||
if (ptr && '(' == *ptr && strncmp(ptr, "(...", 4)) {
|
||||
this->skipToEndBracket(')');
|
||||
SkAssertResult(')' == this->next());
|
||||
this->skipExact("_const");
|
||||
@ -2432,6 +2438,7 @@ public:
|
||||
|
||||
private:
|
||||
string fClassName;
|
||||
string fLocalName;
|
||||
typedef TextParser INHERITED;
|
||||
};
|
||||
|
||||
|
@ -1216,11 +1216,27 @@ Definition* RootDefinition::find(string ref, AllowParens allowParens) {
|
||||
if (leafIter != fLeaves.end()) {
|
||||
return &leafIter->second;
|
||||
}
|
||||
if (AllowParens::kYes == allowParens && string::npos == ref.find("()")) {
|
||||
string withParens = ref + "()";
|
||||
const auto parensIter = fLeaves.find(withParens);
|
||||
if (parensIter != fLeaves.end()) {
|
||||
return &parensIter->second;
|
||||
if (AllowParens::kYes == allowParens) {
|
||||
size_t leftParen = ref.find('(');
|
||||
if (string::npos == leftParen
|
||||
|| (leftParen + 1 < ref.length() && ')' != ref[leftParen + 1])) {
|
||||
string withParens = ref + "()";
|
||||
const auto parensIter = fLeaves.find(withParens);
|
||||
if (parensIter != fLeaves.end()) {
|
||||
return &parensIter->second;
|
||||
}
|
||||
}
|
||||
if (string::npos != leftParen) {
|
||||
string name = ref.substr(0, leftParen);
|
||||
size_t posInDefName = fName.find(name);
|
||||
if (string::npos != posInDefName && posInDefName > 2
|
||||
&& "::" == fName.substr(posInDefName - 2, 2)) {
|
||||
string fullRef = fName + "::" + ref;
|
||||
const auto fullIter = fLeaves.find(fullRef);
|
||||
if (fullIter != fLeaves.end()) {
|
||||
return &fullIter->second;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const auto branchIter = fBranches.find(ref);
|
||||
|
Loading…
Reference in New Issue
Block a user