29 flags += Flags::CreateReleaseLox
30 + Flags::UseReleaseLoggerForDebugLogging
31 + Flags::ALoxVerbosityExportAllAndWriteBackRelLogger;
36 AppCli::onBsPrepareResources();
44"AppName",
"DoxygenXLinks",
47 "(c) 2025-{} AWorx GmbH.\n"
48 " Published under MIT License (Open Source).\n"
49 "More information is found at: https://alib.dev/DoxygenXLinks.\n"
52"AppStart",
A_CHAR(
"{} {} started."),
53"DryRunStart",
A_CHAR(
"!!! Dry-run mode - HTML-files will not be written!!!\n"),
56"HlpUsage" ,
A_CHAR(
"sample [format=\"FORMATSPEC\" [now]|[file FILENAME]"),
57"HlpCLIAppName",
A_CHAR(
"DoxygenXLinks"),
71 "^4," "docanchor" ",4,"
73 "^5," "namespace" ",5,"
81"^12," "variable" ",1,"
82"^13," "function" ",2,"
83"^14," "enumeration" ",5,"
84"^15," "enumvalue" ",5,"
85"^16," "generic_member" ",3,"
88"^17," "FILEPATH_COMPONENT" ",5,"
90"^19," "UNSPECIFIED" ",3,"
92"^21," "UNRESOLVED" ",3" EOS
95"TKINDS" ,
A_CHAR(
"Entity Kind" ) EOS
96"TNODE" ,
A_CHAR(
"Index Node" ) EOS
99"EID0" ,
A_CHAR(
"Dir" " I 3" ),
100"EID1" ,
A_CHAR(
"File" " I 3" ),
101"EID2" ,
A_CHAR(
"Page" " I 4" ),
102"EID3" ,
A_CHAR(
"Group" " I 1" ),
103"EID4" ,
A_CHAR(
"DocAnchor" " I 1 1" ),
104"EID5" ,
A_CHAR(
"NameSpace" " I 1 1" ),
105"EID6" ,
A_CHAR(
"Struct" " I 4" ),
106"EID7" ,
A_CHAR(
"Class" " I 1" ),
107"EID8" ,
A_CHAR(
"Union" " I 1" ),
108"EID9" ,
A_CHAR(
"ConCept" " I 1 1" ),
109"EID10" ,
A_CHAR(
"Macro" " I 1" ),
110"EID11" ,
A_CHAR(
"TypeDef" " I 1" ),
111"EID12" ,
A_CHAR(
"Variable" " I 1" ),
112"EID13" ,
A_CHAR(
"Function" " I 1" ),
113"EID14" ,
A_CHAR(
"Enumeration" " I 1" ),
114"EID15" ,
A_CHAR(
"EnumValue" " I 1 1" ),
115"EID16" ,
A_CHAR(
"GenericMember" " I 1 1" ),
116"EID17" ,
A_CHAR(
"Record" " I 1" ),
117"EID18" ,
A_CHAR(
"UnSpecified" " I 1 1" ),
120"EID19" ,
A_CHAR(
"LinkString" " I 1 1" ),
121"EID20" ,
A_CHAR(
"Display" " I 1" ),
122"EID21" ,
A_CHAR(
"Kind" " I 1" ),
123"EID22" ,
A_CHAR(
"Target" " I 1" ),
124"EID23" ,
A_CHAR(
"Name" " I 1" ),
125"EID24" ,
A_CHAR(
"Path" " I 4" ),
126"EID25" ,
A_CHAR(
"Parent" " I 1" ),
127"EID26" ,
A_CHAR(
"IsGood" " I 1 1" ),
128"EID27" ,
A_CHAR(
"IsResolved" " I 1 1" ),
129"EID28" ,
A_CHAR(
"HasError" " I 1 1" ),
130"EID29" ,
A_CHAR(
"HasWarning" " I 1 1" ),
131"EID30" ,
A_CHAR(
"ErrorCode" " I 1 1" ),
132"EID31" ,
A_CHAR(
"CountScopeHints" " I 1 1 1" ),
133"EID32" ,
A_CHAR(
"ScopeHint" " I 1 1" ),
134"EID33" ,
A_CHAR(
"CountScope" " I 1 1" ),
135"EID34" ,
A_CHAR(
"Scope" " I 1" ),
136"EID35" ,
A_CHAR(
"Identifier" " I 1" ),
137"EID36" ,
A_CHAR(
"CountParaMS" " I 1 1 1 0" ),
138"EID37" ,
A_CHAR(
"ParaMS" " I 1 1 0" ),
139"EID38" ,
A_CHAR(
"CountTemplateParaMS" " I 1 1 1 1 0" ),
140"EID39" ,
A_CHAR(
"TemplateParaMS" " I 1 1 1 0" ),
141"EID40" ,
A_CHAR(
"CountTemplateSpecParaMS" " I 1 1 1 1 1 0" ),
142"EID41" ,
A_CHAR(
"TemplateSpecParaMS" " I 1 1 1 1 0" ),
143"EID42" ,
A_CHAR(
"LinkDisplay" " I 1 1" ),
144"EID43" ,
A_CHAR(
"LinkTarget" " I 1 1" ),
145"EID44" ,
A_CHAR(
"KindSpec" " I 1 1" ),
146"EID45" ,
A_CHAR(
"Depth" " I 3" ),
147"EID46" ,
A_CHAR(
"TagFilePath" " I 1 1 1" ),
148"EID47" ,
A_CHAR(
"TagFileName" " I 1 1 1" ),
149"EID48" ,
A_CHAR(
"TagFileLine" " I 1 1 1" ),
150"EID49" ,
A_CHAR(
"HtmlFile" " I 4 1" ),
151"EID50" ,
A_CHAR(
"HtmlAnchor" " I 4 1" ),
152"EID51" ,
A_CHAR(
"CountSourceLocationS" " I 1 1 1 0" ),
153"EID52" ,
A_CHAR(
"CountHtmlLocationS" " I 1 1 1 0" ),
154"EID53" ,
A_CHAR(
"IsScannedHtmlFile" " I 1 1 1 1" ),
155"EID54" ,
A_CHAR(
"IsIndirectSourceFile" " I 1 1 1 1" ),
156"EID55" ,
A_CHAR(
"IsInherited" " I 1 1" ),
157"EID56" ,
A_CHAR(
"IsIndirectTypeDefMember" " I 1 1 1 1 1" ),
158"EID57" ,
A_CHAR(
"IsIndirectTypeDef" " I 1 1 1 1" ),
162"E",
"1,ErrorOpeningFile" ",ED1"
163 ",2,UnknownKind" ",ED2"
164 ",10,XMLSyntaxError" ",ED10"
165 ",11,NotATagStart" ",ED11"
166 ",12,UnexpectedXMLTag" ",ED12"
167 ",13,XMLEndTagNotInSameLine" ",ED13"
168 ",14,FileNotOnRootLevel" ",ED14"
169 ",15,DuplicateChildName" ",ED15"
170 ",16,DuplicateCompound" ",ED16"
171 ",17,UnexpectedXMLValue" ",ED17"
174"ED1",
"Error opening {}file {!Q}." EOS
175"ED2",
"Unknown kind found @ {}:{} XML: {!Q} found." EOS
176"ED10",
"XML Syntax error @ {}:{} XML: {!Q}" EOS
177"ED11",
"Expected a start of a tag @ {}:{} XML: {!Q}" EOS
178"ED12",
"Unexpected XML-tag @ {}:{} Expected: <{!Q}> Given: {!Q}" EOS
179"ED13",
"XML end-tag not found in same line @ {}:{} Expected: \"</{}>\" Given: {!Q}" EOS
180"ED14",
"File-Compound not on root level of XML file @ {}:{}" EOS
181"ED15",
"Duplicate member name {!Q} in path {!Q}\n"
182 " First definition: @ {}:{}\n"
183 " Second definition: @ {2}:{}" EOS
184"ED16",
"Duplicate compound {!Q}\n"
185 " First definition: @ {}:{}\n"
186 " Second definition: @ {1}:{}" EOS
187"ED17",
"Unexpected value in XML tag @ {}:{} Expected: <{!Q}> Given: {!Q}" EOS
192"XL_ERR_1",
"Too many parents requested to be displayed" EOS
193"XL_ERR_2",
"An anchor without a title was used without providing a user-defined display string.\n"
194 "DoxygenXLinks (like Doxygen itself) inserts the anchor name in this case.\n"
195 "To mitigate this warning, add \";1\" to the link or add a reasonable display string." EOS
196"XL_ERR_3",
"A display tweak was given that is not applicable to the resolved target type" EOS
197"XL_ERR_5",
"The search string is empty (apart from possible whitespaces)." EOS
198"XL_ERR_6",
"No target identifier found." EOS
199"XL_ERR_7",
"Too many scope-hints (words separated with spaces) were given." EOS
200"XL_ERR_8",
"The number of nested scope (namespaces/compounds) is too huge to be processed by DoxygenXLinks (the maximum is 20)" EOS
201"XL_ERR_9",
"The underlying type requested with '^' was not found." EOS
202"XL_ERR_10",
"Unknown kind type requested with '!', or missing space after kind. Allowed type kinds are:\n"
203 " 'd'=directory, 'f'=file, 'p'=Macro, 'n'=Namespace,'c'=Concept, 't'=Typedef 'r'=RECORD, 'c'=class, \n"
204 " 's'=struct, 'u'=union, 'e'=Enumeration 'a'=Enum element 'm'=Function, 'v'=Variable" EOS
205"XL_ERR_11",
"A local link (aka the identifier section starts with '.') must not have scope hints." EOS
206"XL_ERR_12",
"This error is set, with the command line option '--doxyfy'.\n"
207 "As explained in the user manual, equal local links cannot be restored back to\n"
208 "Doxygen's \\\\ref command if they occur in different HTML files. Please check each\n"
209 "location below and manually correct the link to target the right local entitiy." EOS
210"XL_ERR_13",
"This error is set, with the command line option '--doxyfy'.\n"
211 "It occurs when a local link is found in the source-copy to be restored, which has not\n"
212 "been found in the HTML files.\n"
213 "This usually indicates an erroneous setup of the documentation build-steps." EOS
219 "DoxygenXLinks.ini" ),
221 "DoxygenXLinks.alib.ini" ),
224"CFGF_EXP_2" ,
"ALIB,ALOX",
230"DoxygenXLinks Configuration File\n"
231"(c) 2025-2026 AWorx GmbH. Published under MIT License (Open Source).\n"
234"All configuration may also be set using environment variables or command-line parameters. "
235"In this case, such settings 'overrule' those of this INI-File. (While command-line "
236"arguments overrule environment variables.)@P\n"
238"Variable values can be substituted using ${VARIABLE_NAME}. This allows to add custom "
239"variables and assemble defined variables with the custom ones. For an example, see variable "
240"\"DL_LOGFILE_VERBOSITY\" below (section [DL], name \"LOGFILE_VERBOSITY\").@P\n"
242"Sections [ALIB] and [ALOX] are used by underlying libraries the DoxygenXLinks is build on. "
243"By default, these sections reside in (this) main INI-file. It is however possible to "
244"separate the two sections into a different file to reduce clutter. "
245"(Invoke 'DoxygenXLinks -h=config' for options on this).@P@P"
246"ALox is the logging system that the DoxygenXLinks uses to produce log output. For more information on how"
247"to leverage the variables exposed in these sections, refer to:@P"
248" http://alexworx.github.io/ALox-Logging-Library/group__GrpALoxConfigVars.html @P\n"
250"If this INI-file gets deleted (or partly deleted) all built-in default sections, variables, "
251"values and comments will be freshly written on the next invocation of DoxygenXLinks. "
259"DoxygenXLinks Configuration File for underlying libraries ALib and ALox\n"
260"(c) 2025-2026 AWorx GmbH. Published under MIT License (Open Source).\n"
264"This is a separated, secondary configuration file of the DoxygenXLinks software, containing "
265"mainly variables of the underlying logging system ALox.\n"
266"To leverage the variables exposed in this file, refer to:\n"
267" https://alib.dev/alib_alox_cfgvars.html\n"
268"By default, the name of the main configuration file is 'DoxygenXLinks.ini'.\n"
279"DLCmds<",
"Commands::",
282"1," "clean" ",1" ",PD" EOS
284"THlpCmdSht_clean",
A_CHAR(
"Reports the actual date/time"),
285"THlpCmdLng_clean",
A_CHAR(
"Reports the actual date/time. May be omitted, as this is the\n"
286 "default if no command is given.") EOS
291"DLOptions<",
"Options::",
302"1," "PD" ",1," "" "," "=" "," ",-1" ",1" EOS
304"DLParams<",
"Parameters::",
310"20," "CantOpenDoxyfile" ",-1,"
311"21," "NoTagfileGeneratedByDoxyfile" ",-1,"
312"22," "OtherErrorInDoxyfile" ",-1,"
313"23," "TagFileNotFound" ",-1,"
314"24," "NoHTMLFilesFound" ",-1,"
315"25," "CantOpenHMLFile" ",-1,"
316"26," "CantWriteHMLFile" ",-1,"
317"27," "NoSourceFilesFound" ",-1,"
318"28," "CantOpenSrcFile" ",-1,"
319"29," "NoSourceCopiesFound" ",-1,"
320"30," "CantOpenReplSrcFile" ",-1,"
321"31," "CantWriteReplSrcFile" ",-1,"
322"32," "NoReplacementSourceFiles" ",-1" EOS
324"DLExitCodes<",
"ExitCodes::"
326,
"TExit20",
"Doxygen (INI-)file {!Q} not found or not accessible."
327,
"TExit21",
"Entry GENERATE_TAGFILE needs to be set in {!Q} to enable DoxygenXLinks."
328,
"TExit22",
"Error parsing the Doxygen file {!Q}. Details: {}"
329,
"TExit23",
"The tag-file {!Q} specified in the Doxygen (INI-)file {!Q} was not found."
330,
"TExit24",
"No Doxygen output files with extension {!Q} found in directory {!Q}"
331,
"TExit25",
"Cannot open HTML file {!Q} (maybe not accessible)."
332,
"TExit26",
"Cannot write HTML file {!Q} (Error code {})."
333,
"TExit27",
"Did not find any source file with the specifications given in doxyfile {!Q}."
334,
"TExit28",
"Cannot open source file {!Q} (maybe not accessible)."
335,
"TExit29",
"Did not find any copy of source files in folder {!Q} given with option --doxyfy."
336,
"TExit30",
"Cannot open replacement source {!Q} (maybe not accessible)."
337,
"TExit31",
"Cannot write replacement source file {!Q} (Error code {})."
342"\nABOUT DoxygenXLinks\n"
344"This is a command-line interface..."
357 # define errMsg "Error: Incompatible ALox resource string found. Update your code to current ALib version."
371 AppCli::onBsPrepareConfig();
386 erb::Bootstrap<dxl::Exceptions>();
396 s+=
NString256(std::any_cast<Target::Kinds>(any));
403 Enum result= App::exceptionToExitCode(e);
406 if ( result == BuiltInExitCodes::ErrUnknown
409 for(
auto& exitCodeDecl :
cli.ExitCodeDecls )
410 if( exitCodeDecl.second->AssociatedCLIException() == element ) {
411 result= exitCodeDecl.first;
428 AppCli::onBsSetNameVersionAndInfo();
432 AppCli::bsCLIDefine();
441 if ( AppCli::cliProcessCmd(cmd) )
444 if ( cmd ==
nullptr ) {
445 if (
cli.ArgsLeft.size() == 0) {
446 ALIB_ERROR(
"DLX",
"NIY: error output that no doxyfile given")
449 dxl=
new DoxygenXLinks();
462 dxl->TPool.Shutdown();
476int main(
int argc,
const char** argv) {
#define ALIB_ERROR(domain,...)
#define ALIB_LOCK_RECURSIVE_WITH(lock)
#define ALIB_ASSERT_ERROR(cond, domain,...)
#define ALIB_REL_DBG(releaseCode,...)
#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE(TAppendable)
virtual int Main(int argc, const char **argv, const wchar_t **argvw=nullptr)
const Enum & Type() const
virtual bool BootstrapAddOrReplace(const NString &category, const NString &name, const String &data)=0
virtual const String & Get(const NString &category, const NString &name, bool dbgAssert)=0
void onBsSetNameVersionAndInfo() override
alib::Enum exceptionToExitCode(alib::Exception &e) override
void onRunEnd() override
Waits for our thread-pool to become idle, shuts it down, and deletes it.
void onBsPrepareConfig() override
Bootstraps enum records.
void bsCLIDefine() override
Defines ALib CLI entities specific to DoxygenXLinks.
alib::String DoxyfilePath
The file path of the Doxyfile as given on the command line.
void onBsPrepareResources() override
Bulk-loads DoxygenXLinks specific resource strings into module #"APPCLI_CAMP".
bool cliProcessCmd(alib::cli::Command *cmd) override
Kinds
Enumerates the kinds of compounds found in a the Doxygen tagfile.
void RegisterPrintable(std::type_index typeIndex, AnyConversionFunc func)
void Bootstrap(camp::Camp &camp, const NString &name, character innerDelim=',', character outerDelim=',')
TMonoAllocator< lang::HeapAllocator > GLOBAL_ALLOCATOR
resources::ResourcePool ResourcePool
strings::TCString< nchar > NCString
strings::TString< character > String
app::AppCliCamp APPCLI_CAMP
exceptions::Exception Exception
LocalString< 128 > String128
NLocalString< 256 > NString256