-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: tagfiles generation for cross-referencing in doxygen format
- Loading branch information
1 parent
5dc3884
commit 30d3333
Showing
9 changed files
with
670 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// This is a derivative work. originally part of the LLVM Project. | ||
// Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
// Copyright (c) 2024 Fernando Pelliccioni ([email protected]) | ||
// | ||
// Official repository: https://github.com/cppalliance/mrdocs | ||
// | ||
|
||
#include "TagfileGenerator.hpp" | ||
#include "TagfileWriter.hpp" | ||
#include "lib/Support/Radix.hpp" | ||
#include "lib/Support/RawOstream.hpp" | ||
#include <mrdocs/Support/Error.hpp> | ||
#include <mrdocs/Metadata.hpp> | ||
|
||
namespace clang { | ||
namespace mrdocs { | ||
namespace tagfile { | ||
|
||
Error | ||
TagfileGenerator:: | ||
buildOne( | ||
std::ostream& os, | ||
Corpus const& corpus) const | ||
{ | ||
namespace fs = llvm::sys::fs; | ||
RawOstream raw_os(os); | ||
return TagfileWriter(raw_os, corpus).build(); | ||
} | ||
|
||
} // tagfile | ||
|
||
//------------------------------------------------ | ||
|
||
std::unique_ptr<Generator> | ||
makeTagfileGenerator() | ||
{ | ||
return std::make_unique<tagfile::TagfileGenerator>(); | ||
} | ||
|
||
} // mrdocs | ||
} // clang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// | ||
// This is a derivative work. originally part of the LLVM Project. | ||
// Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
// Copyright (c) 2024 Fernando Pelliccioni ([email protected]) | ||
// | ||
// Official repository: https://github.com/cppalliance/mrdocs | ||
// | ||
|
||
#ifndef MRDOCS_LIB_GEN_TAGFILE_TAGFILEGENERATOR_HPP | ||
#define MRDOCS_LIB_GEN_TAGFILE_TAGFILEGENERATOR_HPP | ||
|
||
#include <mrdocs/Platform.hpp> | ||
#include <mrdocs/Generator.hpp> | ||
#include <mrdocs/MetadataFwd.hpp> | ||
#include <mrdocs/Metadata/Javadoc.hpp> | ||
#include <optional> | ||
|
||
namespace clang { | ||
namespace mrdocs { | ||
namespace tagfile { | ||
|
||
//------------------------------------------------ | ||
|
||
struct TagfileGenerator : Generator | ||
{ | ||
std::string_view | ||
id() const noexcept override | ||
{ | ||
return "tagfile"; | ||
} | ||
|
||
std::string_view | ||
displayName() const noexcept override | ||
{ | ||
return "Doxygen Tagfile"; | ||
} | ||
|
||
std::string_view | ||
fileExtension() const noexcept override | ||
{ | ||
return "tag.xml"; | ||
} | ||
|
||
Error | ||
buildOne( | ||
std::ostream& os, | ||
Corpus const& corpus) const override; | ||
}; | ||
|
||
} // tagfile | ||
} // mrdocs | ||
} // clang | ||
|
||
#endif |
Oops, something went wrong.