Skip to content

Commit

Permalink
Set up Doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadden committed Jan 7, 2021
1 parent 43e7808 commit a4f9326
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
.venv
coverage.txt
docs/_build
docs/_doxygen
/*build*
debug.log
17 changes: 17 additions & 0 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
PROJECT_NAME = alia
PROJECT_BRIEF = "a library for interactive applications"

STRIP_FROM_PATH = ../src

INPUT = ../src
EXTRACT_ALL = YES
RECURSIVE = YES
OUTPUT_DIRECTORY = _doxygen

GENERATE_XML = YES
GENERATE_HTML = NO
GENERATE_LATEX = NO
XML_PROGRAMLISTING = NO
CREATE_SUBDIRS = NO

M_SHOW_UNDOCUMENTED = YES
16 changes: 15 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import sys
import os
import subprocess

import sphinx_rtd_theme

project = 'alia'
Expand All @@ -6,6 +10,16 @@

extensions = ['breathe', 'sphinx_rtd_theme']

exclude_patterns = ['_build']
exclude_patterns = ['_build', '_doxygen']

html_theme = 'sphinx_rtd_theme'

breathe_projects = { "alia": "_doxygen/xml" }
breathe_default_project = "alia"

def generate_doxygen_xml(app):
subprocess.check_call(['doxygen', 'Doxyfile'])

def setup(app):
# Add hook for building doxygen xml when needed
app.connect("builder-inited", generate_doxygen_xml)
3 changes: 3 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ This is the reference documentation for alia...
.. toctree::
:maxdepth: 2
:caption: Contents

.. doxygenfunction:: alia::mask

1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sphinx==3.3.1
breathe
3 changes: 2 additions & 1 deletion scripts/set-up-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ set -x -e
virtualenv --prompt="(alia) " "$@" .venv
source .venv/bin/activate
python --version
pip install gcovr sphinx==3.3.1 breathe
pip install gcovr
pip install -r docs/requirements.txt
1 change: 1 addition & 0 deletions src/alia/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ typedef long long counter_type;
// Inspired by Boost, inheriting from noncopyable disables copying for a type.
// The namespace prevents unintended ADL if used by applications.
namespace detail { namespace noncopyable_ {
/// \internal
struct noncopyable
{
noncopyable()
Expand Down
12 changes: 8 additions & 4 deletions src/alia/signals/adaptors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,6 @@ simplify_id(Wrapped wrapped)
return simplified_id_wrapper<Wrapped>(std::move(wrapped));
}

// mask(signal, availibility_flag) does the equivalent of bit masking on
// individual signals. If :availibility_flag evaluates to true, the mask
// evaluates to a signal equivalent to :signal. Otherwise, it evaluates to an
// empty signal of the same type.
template<class Primary, class Mask>
struct masking_signal final
: signal_wrapper<masking_signal<Primary, Mask>, Primary>
Expand Down Expand Up @@ -373,6 +369,14 @@ make_masking_signal(Signal signal, AvailabilityFlag availability_flag)
return masking_signal<Signal, AvailabilityFlag>(
std::move(signal), std::move(availability_flag));
}

/// Mask a signal.
///
/// This does the equivalent of bit-masking on an individual signal. If
/// \p availibility_flag evaluates to true, the mask evaluates to a signal
/// equivalent to \p signal. Otherwise, it evaluates to an empty signal of the
/// same type.
///
template<class Signal, class AvailabilityFlag>
auto
mask(Signal signal, AvailabilityFlag availability_flag)
Expand Down

0 comments on commit a4f9326

Please sign in to comment.