mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-03 12:58:03 +01:00
fixed some PocoDoc issues with C++14
This commit is contained in:
parent
58b257c0a8
commit
b53bf7eca4
@ -420,6 +420,7 @@ void DocWriter::writeClass(const Struct* pStruct)
|
|||||||
writeMethodSummary(ostr, pStruct);
|
writeMethodSummary(ostr, pStruct);
|
||||||
writeNestedClasses(ostr, pStruct);
|
writeNestedClasses(ostr, pStruct);
|
||||||
writeTypes(ostr, pStruct);
|
writeTypes(ostr, pStruct);
|
||||||
|
writeAliases(ostr, pStruct);
|
||||||
writeEnums(ostr, pStruct);
|
writeEnums(ostr, pStruct);
|
||||||
writeConstructors(ostr, pStruct);
|
writeConstructors(ostr, pStruct);
|
||||||
writeDestructor(ostr, pStruct);
|
writeDestructor(ostr, pStruct);
|
||||||
@ -447,10 +448,12 @@ void DocWriter::writeNameSpace(const NameSpace* pNameSpace)
|
|||||||
writeNameSpacesSummary(ostr, pNameSpace);
|
writeNameSpacesSummary(ostr, pNameSpace);
|
||||||
writeClassesSummary(ostr, pNameSpace);
|
writeClassesSummary(ostr, pNameSpace);
|
||||||
writeTypesSummary(ostr, pNameSpace);
|
writeTypesSummary(ostr, pNameSpace);
|
||||||
|
writeAliasesSummary(ostr, pNameSpace);
|
||||||
writeFunctionsSummary(ostr, pNameSpace);
|
writeFunctionsSummary(ostr, pNameSpace);
|
||||||
writeNameSpaces(ostr, pNameSpace);
|
writeNameSpaces(ostr, pNameSpace);
|
||||||
writeClasses(ostr, pNameSpace);
|
writeClasses(ostr, pNameSpace);
|
||||||
writeTypes(ostr, pNameSpace);
|
writeTypes(ostr, pNameSpace);
|
||||||
|
writeAliases(ostr, pNameSpace);
|
||||||
writeEnums(ostr, pNameSpace);
|
writeEnums(ostr, pNameSpace);
|
||||||
writeFunctions(ostr, pNameSpace);
|
writeFunctions(ostr, pNameSpace);
|
||||||
writeVariables(ostr, pNameSpace);
|
writeVariables(ostr, pNameSpace);
|
||||||
@ -1268,10 +1271,17 @@ bool DocWriter::writeSpecial(std::ostream& ostr, std::string& token, std::string
|
|||||||
_htmlMode = true;
|
_htmlMode = true;
|
||||||
}
|
}
|
||||||
else if (token == "%>")
|
else if (token == "%>")
|
||||||
|
{
|
||||||
|
if (_htmlMode)
|
||||||
{
|
{
|
||||||
_htmlMode = false;
|
_htmlMode = false;
|
||||||
ostr << "<p>";
|
ostr << "<p>";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ostr << htmlize(token);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (token == "}>")
|
else if (token == "}>")
|
||||||
{
|
{
|
||||||
_htmlMode = false;
|
_htmlMode = false;
|
||||||
@ -1319,6 +1329,19 @@ bool DocWriter::writeSpecial(std::ostream& ostr, std::string& token, std::string
|
|||||||
ostr << "</tt>";
|
ostr << "</tt>";
|
||||||
_literalMode = false;
|
_literalMode = false;
|
||||||
}
|
}
|
||||||
|
else if (token == "`")
|
||||||
|
{
|
||||||
|
if (!_literalMode)
|
||||||
|
{
|
||||||
|
ostr << "<tt>";
|
||||||
|
_literalMode = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ostr << "</tt>";
|
||||||
|
_literalMode = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (token == "--" && !_literalMode)
|
else if (token == "--" && !_literalMode)
|
||||||
{
|
{
|
||||||
ostr << "—";
|
ostr << "—";
|
||||||
@ -1351,6 +1374,7 @@ void DocWriter::nextToken(std::string::const_iterator& it, const std::string::co
|
|||||||
{
|
{
|
||||||
token += *it++;
|
token += *it++;
|
||||||
if (it != end && std::ispunct(*it)) token += *it++;
|
if (it != end && std::ispunct(*it)) token += *it++;
|
||||||
|
if (it != end && std::ispunct(*it)) token += *it++;
|
||||||
}
|
}
|
||||||
else if (it != end && *it == '[')
|
else if (it != end && *it == '[')
|
||||||
{
|
{
|
||||||
@ -1704,6 +1728,23 @@ void DocWriter::writeTypesSummary(std::ostream& ostr, const NameSpace* pNameSpac
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DocWriter::writeAliasesSummary(std::ostream& ostr, const NameSpace* pNameSpace)
|
||||||
|
{
|
||||||
|
NameSpace::SymbolTable types;
|
||||||
|
pNameSpace->typeAliases(types);
|
||||||
|
if (!types.empty())
|
||||||
|
{
|
||||||
|
ostr << "<p><b>" << tr("Types Aliases") << ":</b> " << std::endl;
|
||||||
|
bool first = true;
|
||||||
|
for (NameSpace::Iterator it = types.begin(); it != types.end(); ++it)
|
||||||
|
{
|
||||||
|
writeNameListItem(ostr, it->second->name(), it->second, pNameSpace, first);
|
||||||
|
}
|
||||||
|
ostr << "</p>" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void DocWriter::writeTypes(std::ostream& ostr, const NameSpace* pNameSpace)
|
void DocWriter::writeTypes(std::ostream& ostr, const NameSpace* pNameSpace)
|
||||||
{
|
{
|
||||||
NameSpace::SymbolTable types;
|
NameSpace::SymbolTable types;
|
||||||
@ -1726,6 +1767,28 @@ void DocWriter::writeTypes(std::ostream& ostr, const NameSpace* pNameSpace)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DocWriter::writeAliases(std::ostream& ostr, const NameSpace* pNameSpace)
|
||||||
|
{
|
||||||
|
NameSpace::SymbolTable types;
|
||||||
|
pNameSpace->typeAliases(types);
|
||||||
|
bool hasTypes = false;
|
||||||
|
for (NameSpace::Iterator it = types.begin(); !hasTypes && it != types.end(); ++it)
|
||||||
|
{
|
||||||
|
if (it->second->getAccess() != Symbol::ACC_PRIVATE)
|
||||||
|
hasTypes = true;
|
||||||
|
}
|
||||||
|
if (hasTypes)
|
||||||
|
{
|
||||||
|
writeSubTitle(ostr, tr("Types Aliases"));
|
||||||
|
for (NameSpace::Iterator it = types.begin(); it != types.end(); ++it)
|
||||||
|
{
|
||||||
|
if (it->second->getAccess() != Symbol::ACC_PRIVATE)
|
||||||
|
writeType(ostr, static_cast<const TypeDef*>(it->second));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void DocWriter::writeType(std::ostream& ostr, const TypeDef* pType)
|
void DocWriter::writeType(std::ostream& ostr, const TypeDef* pType)
|
||||||
{
|
{
|
||||||
ostr << "<h3>";
|
ostr << "<h3>";
|
||||||
@ -1913,6 +1976,8 @@ void DocWriter::writeFunction(std::ostream& ostr, const Function* pFunc)
|
|||||||
ostr << " override";
|
ostr << " override";
|
||||||
else if (pFunc->flags() & Function::FN_FINAL)
|
else if (pFunc->flags() & Function::FN_FINAL)
|
||||||
ostr << " final";
|
ostr << " final";
|
||||||
|
if (pFunc->flags() & Function::FN_NOEXCEPT)
|
||||||
|
ostr << " noexcept";
|
||||||
if (pFunc->flags() & Function::FN_DELETE)
|
if (pFunc->flags() & Function::FN_DELETE)
|
||||||
ostr << " = delete";
|
ostr << " = delete";
|
||||||
else if (pFunc->flags() & Function::FN_DEFAULT)
|
else if (pFunc->flags() & Function::FN_DEFAULT)
|
||||||
|
@ -155,7 +155,9 @@ protected:
|
|||||||
void writeClasses(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
|
void writeClasses(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
|
||||||
void writeClassSummary(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
|
void writeClassSummary(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
|
||||||
void writeTypesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
|
void writeTypesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
|
||||||
|
void writeAliasesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
|
||||||
void writeTypes(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
|
void writeTypes(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
|
||||||
|
void writeAliases(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
|
||||||
void writeType(std::ostream& ostr, const Poco::CppParser::TypeDef* pType);
|
void writeType(std::ostream& ostr, const Poco::CppParser::TypeDef* pType);
|
||||||
void writeEnums(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
|
void writeEnums(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
|
||||||
void writeEnum(std::ostream& ostr, const Poco::CppParser::Enum* pEnum);
|
void writeEnum(std::ostream& ostr, const Poco::CppParser::Enum* pEnum);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user