include all examples in generated docs
parent
0ae9838b83
commit
d6a2a3f07c
|
@ -790,7 +790,7 @@ WARN_LOGFILE =
|
||||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||||
# Note: If this tag is empty the current directory is searched.
|
# Note: If this tag is empty the current directory is searched.
|
||||||
|
|
||||||
INPUT = . ../ostd
|
INPUT = . ../ostd ../examples
|
||||||
|
|
||||||
# This tag can be used to specify the character encoding of the source files
|
# This tag can be used to specify the character encoding of the source files
|
||||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||||
|
@ -906,14 +906,14 @@ EXCLUDE_SYMBOLS = detail
|
||||||
# that contain example code fragments that are included (see the \include
|
# that contain example code fragments that are included (see the \include
|
||||||
# command).
|
# command).
|
||||||
|
|
||||||
EXAMPLE_PATH =
|
EXAMPLE_PATH = ../examples
|
||||||
|
|
||||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
|
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
|
||||||
# *.h) to filter out the source-files in the directories. If left blank all
|
# *.h) to filter out the source-files in the directories. If left blank all
|
||||||
# files are included.
|
# files are included.
|
||||||
|
|
||||||
EXAMPLE_PATTERNS = *
|
EXAMPLE_PATTERNS = *.cc
|
||||||
|
|
||||||
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
||||||
# searched for input files to be used with the \include or \dontinclude commands
|
# searched for input files to be used with the \include or \dontinclude commands
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
/** @example concurrency.cc
|
||||||
|
*
|
||||||
|
* A simple example of the concurrency module usage, explaining schdulers,
|
||||||
|
* ostd::spawn(), ostd::tid as well as ostd::channel.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <ostd/io.hh>
|
#include <ostd/io.hh>
|
||||||
#include <ostd/concurrency.hh>
|
#include <ostd/concurrency.hh>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/** @example coroutine1.cc
|
||||||
|
*
|
||||||
|
* An example of using plain coroutines as resumable functions.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <ostd/io.hh>
|
#include <ostd/io.hh>
|
||||||
#include <ostd/coroutine.hh>
|
#include <ostd/coroutine.hh>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/** @example coroutine2.cc
|
||||||
|
*
|
||||||
|
* An example of using coroutines as generators as well as nested resume/yield.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <ostd/io.hh>
|
#include <ostd/io.hh>
|
||||||
#include <ostd/coroutine.hh>
|
#include <ostd/coroutine.hh>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
/** @example format.cc
|
||||||
|
*
|
||||||
|
* An example of using the string formatting system, including various
|
||||||
|
* differences from C such as user defined type and range formatting.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/** @example listdir.cc
|
||||||
|
*
|
||||||
|
* A simple example of integration of std::filesystem with ranges.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <ostd/io.hh>
|
#include <ostd/io.hh>
|
||||||
#include <ostd/filesystem.hh>
|
#include <ostd/filesystem.hh>
|
||||||
#include <ostd/range.hh>
|
#include <ostd/range.hh>
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/** @exmaple range.cc
|
||||||
|
*
|
||||||
|
* Simple examples of usage of the range system without using the pipe syntax.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <ostd/range.hh>
|
#include <ostd/range.hh>
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/** @exmaple range_pipe.cc
|
||||||
|
*
|
||||||
|
* Simple examples of usage of the range system using the pipe syntax.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
/** @example stream1.cc
|
||||||
|
*
|
||||||
|
* An example of using streams to read and write binary files
|
||||||
|
* with some help from the standard range algorithms.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <ostd/platform.hh>
|
#include <ostd/platform.hh>
|
||||||
#include <ostd/io.hh>
|
#include <ostd/io.hh>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
/** @example stream2.cc
|
||||||
|
*
|
||||||
|
* An example of using streams to process strings, including some
|
||||||
|
* standard range algorithm use.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <ostd/algorithm.hh>
|
#include <ostd/algorithm.hh>
|
||||||
|
|
|
@ -15,15 +15,7 @@
|
||||||
*
|
*
|
||||||
* Typical usage of the concurrency system is as follows:
|
* Typical usage of the concurrency system is as follows:
|
||||||
*
|
*
|
||||||
* ~~~{.cc}
|
* @include concurrency.cc
|
||||||
* #include <ostd/concurrency.hh>
|
|
||||||
*
|
|
||||||
* int main() {
|
|
||||||
* ostd::coroutine_scheduler{}.start([]() {
|
|
||||||
* // the rest of main follows
|
|
||||||
* });
|
|
||||||
* }
|
|
||||||
* ~~~
|
|
||||||
*
|
*
|
||||||
* See the examples provided with the library for further information.
|
* See the examples provided with the library for further information.
|
||||||
*
|
*
|
||||||
|
@ -40,6 +32,8 @@
|
||||||
* This file implements several schedulers as well as APIs to spawn
|
* This file implements several schedulers as well as APIs to spawn
|
||||||
* tasks, coroutines and channels that utilize the current scheduler's API.
|
* tasks, coroutines and channels that utilize the current scheduler's API.
|
||||||
*
|
*
|
||||||
|
* @include concurrency.cc
|
||||||
|
*
|
||||||
* @copyright See COPYING.md in the project tree for further information.
|
* @copyright See COPYING.md in the project tree for further information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,14 @@
|
||||||
* also be used as generators and generally anywhere where you'd like to
|
* also be used as generators and generally anywhere where you'd like to
|
||||||
* suspend a function and resume it later (all kinds of async apps).
|
* suspend a function and resume it later (all kinds of async apps).
|
||||||
*
|
*
|
||||||
|
* Plain coroutine usage:
|
||||||
|
*
|
||||||
|
* @include coroutine1.cc
|
||||||
|
*
|
||||||
|
* Generators and more:
|
||||||
|
*
|
||||||
|
* @include coroutine2.cc
|
||||||
|
*
|
||||||
* @copyright See COPYING.md in the project tree for further information.
|
* @copyright See COPYING.md in the project tree for further information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
* It also provides range integration for directory iterators and
|
* It also provides range integration for directory iterators and
|
||||||
* ostd::format_traits specialization for std::filesystem::path.
|
* ostd::format_traits specialization for std::filesystem::path.
|
||||||
*
|
*
|
||||||
|
* @include listdir.cc
|
||||||
|
*
|
||||||
* @copyright See COPYING.md in the project tree for further information.
|
* @copyright See COPYING.md in the project tree for further information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
* and supports custom object formatting without heap allocations as well
|
* and supports custom object formatting without heap allocations as well
|
||||||
* as formatting of ranges, tuples and more.
|
* as formatting of ranges, tuples and more.
|
||||||
*
|
*
|
||||||
|
* @include format.cc
|
||||||
|
*
|
||||||
* @copyright See COPYING.md in the project tree for further information.
|
* @copyright See COPYING.md in the project tree for further information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,14 @@
|
||||||
* as well as wrappers over standard input/output/error and global functions
|
* as well as wrappers over standard input/output/error and global functions
|
||||||
* for formatted writing into standard output.
|
* for formatted writing into standard output.
|
||||||
*
|
*
|
||||||
|
* Some string examples:
|
||||||
|
*
|
||||||
|
* @include stream2.cc
|
||||||
|
*
|
||||||
|
* And binary examples:
|
||||||
|
*
|
||||||
|
* @include stream1.cc
|
||||||
|
*
|
||||||
* @copyright See COPYING.md in the project tree for further information.
|
* @copyright See COPYING.md in the project tree for further information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,14 @@
|
||||||
* There is a whole article dedicated to ranges [here](@ref ranges). You can
|
* There is a whole article dedicated to ranges [here](@ref ranges). You can
|
||||||
* also take a look at the many examples in the project tree.
|
* also take a look at the many examples in the project tree.
|
||||||
*
|
*
|
||||||
|
* Some more examples:
|
||||||
|
*
|
||||||
|
* @include range.cc
|
||||||
|
*
|
||||||
|
* Pipe syntax examples:
|
||||||
|
*
|
||||||
|
* @include range_pipe.cc
|
||||||
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -31,6 +39,14 @@
|
||||||
* This file provides the actual range system implementation,
|
* This file provides the actual range system implementation,
|
||||||
* some basic range types, iteration utilities and range traits.
|
* some basic range types, iteration utilities and range traits.
|
||||||
*
|
*
|
||||||
|
* Some examples:
|
||||||
|
*
|
||||||
|
* @include range.cc
|
||||||
|
*
|
||||||
|
* Pipe syntax examples:
|
||||||
|
*
|
||||||
|
* @include range_pipe.cc
|
||||||
|
*
|
||||||
* @copyright See COPYING.md in the project tree for further information.
|
* @copyright See COPYING.md in the project tree for further information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -5,18 +5,13 @@
|
||||||
* Libostd provides a custom stream system with considerably simpler API
|
* Libostd provides a custom stream system with considerably simpler API
|
||||||
* and integration with other libostd features (such as ranges).
|
* and integration with other libostd features (such as ranges).
|
||||||
*
|
*
|
||||||
* A simple example:
|
* Some string examples:
|
||||||
*
|
*
|
||||||
* ~~~{.cc}
|
* @include stream2.cc
|
||||||
* #include <ostd/io.hh>
|
|
||||||
*
|
*
|
||||||
* int main() {
|
* And binary examples:
|
||||||
* ostd::file_stream fs{"input.txt"};
|
*
|
||||||
* for (auto const &line: fs.iter_lines()) {
|
* @include stream1.cc
|
||||||
* writefln("read line: %s", line);
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* ~~~
|
|
||||||
*
|
*
|
||||||
* See the examples provided with the library for further information.
|
* See the examples provided with the library for further information.
|
||||||
*
|
*
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
* }
|
* }
|
||||||
* ~~~
|
* ~~~
|
||||||
*
|
*
|
||||||
|
* An example of using libostd string formatting:
|
||||||
|
*
|
||||||
|
* @include format.cc
|
||||||
|
*
|
||||||
* See the examples provided with the library for further information.
|
* See the examples provided with the library for further information.
|
||||||
*
|
*
|
||||||
* @{
|
* @{
|
||||||
|
|
Loading…
Reference in New Issue