Skip to content

Commit aa5999a

Browse files
committed
access control for all infos
1 parent 8d9304b commit aa5999a

14 files changed

+986
-2806
lines changed

src/Asciidoc.h

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
//
2+
// This is a derivative work. originally part of the LLVM Project.
3+
// Licensed under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
// Copyright (c) 2023 Vinnie Falco ([email protected])
8+
//
9+
// Official repository: https://github.com/cppalliance/mrdox
10+
//
11+
12+
#ifndef MRDOX_ASCIIDOC_HPP
13+
#define MRDOX_ASCIIDOC_HPP
14+
15+
namespace mrdox {
16+
namespace adoc {
17+
18+
template<class T>
19+
class table
20+
{
21+
T const& t_;
22+
23+
public:
24+
explicit
25+
table(T const& t) noexcept
26+
: t_(t)
27+
{
28+
}
29+
30+
template<class T_>
31+
friend
32+
llvm::raw_ostream&
33+
operator<<(
34+
llvm::raw_ostream& os,
35+
table<T_> const& t)
36+
{
37+
os <<
38+
"[cols=2]\n" <<
39+
"|===\n";
40+
41+
if(t.empty())
42+
{
43+
os <<
44+
"|===\n"
45+
"\n";
46+
return os;
47+
}
48+
}
49+
};
50+
51+
} // adoc
52+
} // mrdox
53+
54+
#endif

0 commit comments

Comments
 (0)