From a15cf65c44d5c224169c32ef5495b68c758134b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 18 May 2014 16:08:14 +0200 Subject: Imported Upstream version 3.3.0.2 --- libcult/documentation/BUGS | 2 + libcult/documentation/CORE | 14 +++ libcult/documentation/DESIGN | 12 +++ libcult/documentation/DOC | 1 + libcult/documentation/NOTES | 3 + libcult/documentation/RELEASE | 1 + libcult/documentation/THOGHTS | 1 + libcult/documentation/TODO | 3 + libcult/documentation/TODO-CLI | 7 ++ libcult/documentation/TODO-EH | 5 + libcult/documentation/TODO-META | 2 + libcult/documentation/TODO-MM | 3 + libcult/documentation/TODO-SCHED | 12 +++ libcult/documentation/cli/index.xhtml | 106 +++++++++++++++++++++ libcult/documentation/default.css | 160 ++++++++++++++++++++++++++++++++ libcult/documentation/dr/index.xhtml | 57 ++++++++++++ libcult/documentation/eh/index.xhtml | 106 +++++++++++++++++++++ libcult/documentation/index.xhtml | 78 ++++++++++++++++ libcult/documentation/meta/index.xhtml | 70 ++++++++++++++ libcult/documentation/mm/index.xhtml | 77 +++++++++++++++ libcult/documentation/os/index.xhtml | 57 ++++++++++++ libcult/documentation/rtti/index.xhtml | 57 ++++++++++++ libcult/documentation/sched/index.xhtml | 57 ++++++++++++ libcult/documentation/trace/index.xhtml | 102 ++++++++++++++++++++ libcult/documentation/types/index.xhtml | 56 +++++++++++ 25 files changed, 1049 insertions(+) create mode 100644 libcult/documentation/BUGS create mode 100644 libcult/documentation/CORE create mode 100644 libcult/documentation/DESIGN create mode 100644 libcult/documentation/DOC create mode 100644 libcult/documentation/NOTES create mode 100644 libcult/documentation/RELEASE create mode 100644 libcult/documentation/THOGHTS create mode 100644 libcult/documentation/TODO create mode 100644 libcult/documentation/TODO-CLI create mode 100644 libcult/documentation/TODO-EH create mode 100644 libcult/documentation/TODO-META create mode 100644 libcult/documentation/TODO-MM create mode 100644 libcult/documentation/TODO-SCHED create mode 100644 libcult/documentation/cli/index.xhtml create mode 100644 libcult/documentation/default.css create mode 100644 libcult/documentation/dr/index.xhtml create mode 100644 libcult/documentation/eh/index.xhtml create mode 100644 libcult/documentation/index.xhtml create mode 100644 libcult/documentation/meta/index.xhtml create mode 100644 libcult/documentation/mm/index.xhtml create mode 100644 libcult/documentation/os/index.xhtml create mode 100644 libcult/documentation/rtti/index.xhtml create mode 100644 libcult/documentation/sched/index.xhtml create mode 100644 libcult/documentation/trace/index.xhtml create mode 100644 libcult/documentation/types/index.xhtml (limited to 'libcult/documentation') diff --git a/libcult/documentation/BUGS b/libcult/documentation/BUGS new file mode 100644 index 0000000..139597f --- /dev/null +++ b/libcult/documentation/BUGS @@ -0,0 +1,2 @@ + + diff --git a/libcult/documentation/CORE b/libcult/documentation/CORE new file mode 100644 index 0000000..76e1a69 --- /dev/null +++ b/libcult/documentation/CORE @@ -0,0 +1,14 @@ +* types + +* eh + +* trace + +* mm -> eh, sched + +* meta + +* rtti -> containers!! + +* sched -> eh, mm + diff --git a/libcult/documentation/DESIGN b/libcult/documentation/DESIGN new file mode 100644 index 0000000..6d469a5 --- /dev/null +++ b/libcult/documentation/DESIGN @@ -0,0 +1,12 @@ + +@@ First layer include language usage policies (e.g. namespaces, eh) + and base libraries: + + eh, threading, memory management, tracing, containers + +@@ Tracing in libraries? Is it possible? + + + + + \ No newline at end of file diff --git a/libcult/documentation/DOC b/libcult/documentation/DOC new file mode 100644 index 0000000..a593886 --- /dev/null +++ b/libcult/documentation/DOC @@ -0,0 +1 @@ +@@ Update README, NEWS and INSTALL (from index.xhtml) diff --git a/libcult/documentation/NOTES b/libcult/documentation/NOTES new file mode 100644 index 0000000..81b48e5 --- /dev/null +++ b/libcult/documentation/NOTES @@ -0,0 +1,3 @@ +@@ SUS dlsym has some ideas about symbol interpositions. + This could be relevant to the problem of calling orginal + operator new. diff --git a/libcult/documentation/RELEASE b/libcult/documentation/RELEASE new file mode 100644 index 0000000..3a7f1ab --- /dev/null +++ b/libcult/documentation/RELEASE @@ -0,0 +1 @@ +@@ copyright diff --git a/libcult/documentation/THOGHTS b/libcult/documentation/THOGHTS new file mode 100644 index 0000000..7bf1767 --- /dev/null +++ b/libcult/documentation/THOGHTS @@ -0,0 +1 @@ +@@ Access local resources the same way you access remote resources. diff --git a/libcult/documentation/TODO b/libcult/documentation/TODO new file mode 100644 index 0000000..a35515b --- /dev/null +++ b/libcult/documentation/TODO @@ -0,0 +1,3 @@ +@@ installation + +@@ Add short description for each example. \ No newline at end of file diff --git a/libcult/documentation/TODO-CLI b/libcult/documentation/TODO-CLI new file mode 100644 index 0000000..242c0da --- /dev/null +++ b/libcult/documentation/TODO-CLI @@ -0,0 +1,7 @@ +@@ I should not assume that Utility::CommandLine is the only mechanism + used to parse command line. Application developer may be using + different components that employ different command line parsers. + Thus it seem to me that I should use argv/argc as input/output + format. + +@@ Notion of a default command (e.g., a& --help). diff --git a/libcult/documentation/TODO-EH b/libcult/documentation/TODO-EH new file mode 100644 index 0000000..ed7c133 --- /dev/null +++ b/libcult/documentation/TODO-EH @@ -0,0 +1,5 @@ +@@ Since there is only one header in eh maybe I should just make it + top-level eh.hxx? One disadvantage of this is that I will have to + qualify it with cult::exception when I inherit class-specific + exception base (maybe it is not too bad actually). + \ No newline at end of file diff --git a/libcult/documentation/TODO-META b/libcult/documentation/TODO-META new file mode 100644 index 0000000..21eabd5 --- /dev/null +++ b/libcult/documentation/TODO-META @@ -0,0 +1,2 @@ + +@@ Move meta tests from other places to meta/. diff --git a/libcult/documentation/TODO-MM b/libcult/documentation/TODO-MM new file mode 100644 index 0000000..7979d15 --- /dev/null +++ b/libcult/documentation/TODO-MM @@ -0,0 +1,3 @@ +@@ new with arbitrary alignment + +%% Does not work if thread is not the most derived type. See 12.7.5. diff --git a/libcult/documentation/TODO-SCHED b/libcult/documentation/TODO-SCHED new file mode 100644 index 0000000..eeea3bb --- /dev/null +++ b/libcult/documentation/TODO-SCHED @@ -0,0 +1,12 @@ +@@ typedef std::thread_cancel in cult::os::sched? + +@@ maybe define USE_CXX_UNWIND or something in pthread.h + so I can detect that? + +@@ rename auto_lock to lock? + +@@ maybe add sched::exception: os::exception i.e., "scheduling exception"? + +@@ I am throwing exceptions in sched::thread that are not derived from + sched::exception. + \ No newline at end of file diff --git a/libcult/documentation/cli/index.xhtml b/libcult/documentation/cli/index.xhtml new file mode 100644 index 0000000..9c3f1a8 --- /dev/null +++ b/libcult/documentation/cli/index.xhtml @@ -0,0 +1,106 @@ + + + + + + + + + libcult/documentation/cli + + + + + + + + + + + + + + +
+

The libcult command line interace library provides +mechanisms for extracting informtaion from the command line. The +following code fragment is from libcult/examples/cli:

+ +
+namespace
+{
+  extern Char const help[] = "help";
+  extern Char const version[] = "version";
+  extern Char const outdir[] = "outdir";
+}
+
+typedef
+CLI::Options<help, Boolean,
+             version, Boolean,
+             outdir, String>
+Options;
+
+Int
+main (Int argc, Char* argv[])
+{
+  try
+  {
+    Options options (CLI::parse<Options> (argc, argv));
+
+    if (options.value<help> ())
+    {
+      cerr << "usage: " << argv[0] << " [--help] [--version] [--outdir <dir>]"
+           << endl;
+      return 0;
+    }
+
+    if (options.value<version> ())
+    {
+      cerr << argv[0] << " 1.2.3" << endl;
+      return 0;
+    }
+
+    if (String dir = options.value<outdir> ())
+    {
+      cerr << "outdir: " << dir << endl;
+    }
+  }
+  catch (CLI::UnexpectedOption const& e)
+  {
+    cerr << "unexpected option " << e.option () <<endl;
+  }
+  catch (CLI::OptionFormat const& e)
+  {
+    cerr << "bad format for " << e.option () << endl;
+  }
+}
+
+
+ +
+

Copyright © 2005-2010 Boris Kolpackov.

+ +
+Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU Free +Documentation License, version 1.2; with no Invariant Sections, no +Front-Cover Texts and no Back-Cover Texts. +
+
+ + + diff --git a/libcult/documentation/default.css b/libcult/documentation/default.css new file mode 100644 index 0000000..7242a94 --- /dev/null +++ b/libcult/documentation/default.css @@ -0,0 +1,160 @@ +body { + font-family : sans-serif; + font-weight : normal; + + color : black; + background : white; + + max-width : 42em; + padding : 2em 2em 2em 3em; + margin : 0 auto; +} + +h1, h2, h3, h4, h5, h6 { + font-family : sans-serif; + font-weight : 500; +} + +h1 { font-size : 170%; } +h2 { font-size : 145%; } +h3 { font-size : 125%; } +h4 { font-size : 110%; } +h5 { font-size : 106%; } +h6 { font-size : 100%; } + + +p.indent { + margin-left : 1.5em; +} + + +/* table of content */ +ul.toc li { + padding : .4em 0em 0em 0em; +} + + + +/* list of links */ +ul.menu { + list-style-type : none; +} + +ul.menu li { + padding-top : 0.3em; + padding-bottom : 0.3em; +} + + + +/* @@ I should probably use child selector here */ +/* list with multiline list-elements */ +ul.multiline li { + padding-top : 0.4em; + padding-bottom : 0.4em; +} + +ol.multiline li { + padding-top : 0.4em; + padding-bottom : 0.4em; +} + +dl.multiline dd { + padding-top : 0.4em; + padding-bottom : 0.4em; +} + +/* code */ + +code { + font-size : 114%; + font-family : monospace; +} + + +/* C++ code snippet */ +pre.cxx { + + margin-top : 0em; + margin-bottom : 2em; + + margin-left : 1em; +} + + + +/* make code snippet */ +pre.make { + + margin-top : 0em; + margin-bottom : 2em; + + margin-left : 1em; +} + + + +/* terminal output */ +pre.term { + + margin-top : 0em; + margin-bottom : 2em; + + margin-left : 1em; +} + + +/* Images */ +div.center { + text-align: center; +} + +/* Navigation. */ +#navigation { + margin-top: 1em; + border-bottom: 1px dashed #000000; +} + +#content { + margin-top: 2.5em; +} + + +/* Document info. */ +#docinfo { + margin-top: 4em; + border-top: 1px dashed #000000; + font-size: 70%; +} + +/* distribution terms */ +div.terms { + font-size : 114%; + font-family : monospace; +} + + + +/* Footnote */ + +#footnote { + margin-top: 2em; +} + +#footnote hr { + margin-left: 0; + margin-bottom: 1.5em; + width: 8em; + border-top: 1px solid #000000; + border-right: none; + border-bottom: none; + border-left: none; + +} + +#footnote p { + font-size: .91em; + text-indent: -0.8em; + padding-left: 0.8em; +} + diff --git a/libcult/documentation/dr/index.xhtml b/libcult/documentation/dr/index.xhtml new file mode 100644 index 0000000..0726adb --- /dev/null +++ b/libcult/documentation/dr/index.xhtml @@ -0,0 +1,57 @@ + + + + + + + + + libcult/documentation/dr + + + + + + + + + + + + + + +
+

The libcult data representation library provides serialization +streams for reading/writing data representations. Only XDR is supported +in current version.

+
+ + +
+

Copyright © 2005-2010 Boris Kolpackov.

+ +
+Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU Free +Documentation License, version 1.2; with no Invariant Sections, no +Front-Cover Texts and no Back-Cover Texts. +
+
+ + + diff --git a/libcult/documentation/eh/index.xhtml b/libcult/documentation/eh/index.xhtml new file mode 100644 index 0000000..7847c11 --- /dev/null +++ b/libcult/documentation/eh/index.xhtml @@ -0,0 +1,106 @@ + + + + + + + + + libcult/documentation/eh + + + + + + + + + + + + + + +
+

The libcult exception handling library defines a base +exception type to be used by the rest of libcult. It has +a very basic interface:

+ +
+namespace Cult
+{
+  namespace EH
+  {
+    class Exception: public virtual std::exception
+    {
+    public:
+      virtual char const*
+      what () const throw ();
+    };
+  }
+}
+
+ +

It derives from std::exception to allow catching +all exceptions with a single handler. Default implementation of the +what() member function returns type-name of the exception. +

+ +

Every non-trivial library in libcult derives its own +base exception which all library-defined exceptions inherit. This +way you can catch all exceptions from a library with one handler.

+ +

Sometimes it may seem convenient to further partition (by providing +corresponding base classes) exceptions space into logic +exceptions (shared by all implementations) and implementation +exceptions. For example, if you pass an allocator illegal size 0 then +the allocator throws an exception which can be classified as a logic +exception. If, however, you passed valid size but there is not enough +memory then the allocator throws an exception which can be classified +as an implementation exception1.

+ +

The problem with this approach lies in the fact that someone's logic +exception is someone else's implementation exception. Consider, for +instance, a buffer type that is implemented in terms of our allocator. +If the buffer happened to request a memory block of size 0 and let +the exception propagate through the interface boundaries it is no longer +a logic exception.

+ + +
+
+

1 It can be argued that the +NoMemory exception should rather be classified +as logic. However, let's assume there are allocator implementations +that have infinite memory.

+
+ +
+ +
+

Copyright © 2005-2010 Boris Kolpackov.

+ +
+Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU Free +Documentation License, version 1.2; with no Invariant Sections, no +Front-Cover Texts and no Back-Cover Texts. +
+
+ + + diff --git a/libcult/documentation/index.xhtml b/libcult/documentation/index.xhtml new file mode 100644 index 0000000..cc2f45d --- /dev/null +++ b/libcult/documentation/index.xhtml @@ -0,0 +1,78 @@ + + + + + + + + + libcult/documentation + + + + + + + + + + + + + + +
+

A number of lower-level libraries are grouped to form a core. Certain +organizational rules are relaxed for this group. For instance, libraries +from the core are allowed to have cyclic dependecies and can inject names +into the top-level namespace cult. Below is the list of +libraries that currently constitute the core:

+ + + +

The rest of the libraries normally depend on the core but not +vice-versa. Below is the list of them:

+ + +
+ + +
+

Copyright © 2005-2010 Boris Kolpackov.

+ +
+Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU Free +Documentation License, version 1.2; with no Invariant Sections, no +Front-Cover Texts and no Back-Cover Texts. +
+
+ + + diff --git a/libcult/documentation/meta/index.xhtml b/libcult/documentation/meta/index.xhtml new file mode 100644 index 0000000..15ae7a5 --- /dev/null +++ b/libcult/documentation/meta/index.xhtml @@ -0,0 +1,70 @@ + + + + + + + + + libcult/documentation/meta + + + + + + + + + + + + + + +
+

The libcult metaprogramming library provides a template +metaprogramming framework, tests and transformations.

+ +

Tests:

+ + + +

Transformations:

+ + +
+ +
+

Copyright © 2005-2010 Boris Kolpackov.

+ +
+Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU Free +Documentation License, version 1.2; with no Invariant Sections, no +Front-Cover Texts and no Back-Cover Texts. +
+
+ + + diff --git a/libcult/documentation/mm/index.xhtml b/libcult/documentation/mm/index.xhtml new file mode 100644 index 0000000..8ed79d4 --- /dev/null +++ b/libcult/documentation/mm/index.xhtml @@ -0,0 +1,77 @@ + + + + + + + + + libcult/documentation/mm + + + + + + + + + + + + + + +
+

The libcult memory management library provides +non-intrusive reference counter and a couple of smart pointers.

+ +

It also overrides and overloads default memory management operators +(operator new and operator delete) to allow +special service objects (reference counter being one of them) to be +constructed in the memory block preceding the instance. This allows +transparent instrumentation of objects with a special +functionality like reference counting or locking.

+ +

The two flavors of smart pointers are exclusive (called +Evptr, from exclusive +pointer) and shared (called Shptr, +from shared pointer) pointers.

+ +

The exclusive pointer has semantics similar to std::auto_ptr +(i.e., exclusive ownership of the object pointed to) except that it performs +automatic copying of the object pointed to when copied or assigned to another +exclusive pointer. Built-in copy-on-write optimization eliminates unnecessary +copying when instances of exclusive pointers are returned from functions or +stored in containers.

+ +

The shared pointer has standard semantics of a reference-counting smart +pointer.

+
+ +
+

Copyright © 2005-2010 Boris Kolpackov.

+ +
+Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU Free +Documentation License, version 1.2; with no Invariant Sections, no +Front-Cover Texts and no Back-Cover Texts. +
+
+ + + diff --git a/libcult/documentation/os/index.xhtml b/libcult/documentation/os/index.xhtml new file mode 100644 index 0000000..62914fa --- /dev/null +++ b/libcult/documentation/os/index.xhtml @@ -0,0 +1,57 @@ + + + + + + + + + libcult/documentation/os + + + + + + + + + + + + + + +
+

The libcult operating system library provides an object-oriented +interface to the OS primitives as defined by the Single +UNIX Specification. Only basic networking is supported in this +version.

+
+ +
+

Copyright © 2005-2010 Boris Kolpackov.

+ +
+Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU Free +Documentation License, version 1.2; with no Invariant Sections, no +Front-Cover Texts and no Back-Cover Texts. +
+
+ + + diff --git a/libcult/documentation/rtti/index.xhtml b/libcult/documentation/rtti/index.xhtml new file mode 100644 index 0000000..ff3238c --- /dev/null +++ b/libcult/documentation/rtti/index.xhtml @@ -0,0 +1,57 @@ + + + + + + + + + libcult/documentation/rtti + + + + + + + + + + + + + + +
+

The libcult run-time type information (rtti) library provides +a convenience wrapper around std::type_info as well as +facilities for optional extended type information (e.g., inheritance +graph).

+
+ +
+

Copyright © 2005-2010 Boris Kolpackov.

+ +
+Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU Free +Documentation License, version 1.2; with no Invariant Sections, no +Front-Cover Texts and no Back-Cover Texts. +
+
+ + + diff --git a/libcult/documentation/sched/index.xhtml b/libcult/documentation/sched/index.xhtml new file mode 100644 index 0000000..b685471 --- /dev/null +++ b/libcult/documentation/sched/index.xhtml @@ -0,0 +1,57 @@ + + + + + + + + + libcult/documentation/sched + + + + + + + + + + + + + + +
+

The libcult scheduling library provides an object-oriented +interface to POSIX thread primitives as defined by the Single +UNIX Specification.

+
+ + +
+

Copyright © 2005-2010 Boris Kolpackov.

+ +
+Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU Free +Documentation License, version 1.2; with no Invariant Sections, no +Front-Cover Texts and no Back-Cover Texts. +
+
+ + + diff --git a/libcult/documentation/trace/index.xhtml b/libcult/documentation/trace/index.xhtml new file mode 100644 index 0000000..eb00f04 --- /dev/null +++ b/libcult/documentation/trace/index.xhtml @@ -0,0 +1,102 @@ + + + + + + + + + libcult/documentation/trace + + + + + + + + + + + + + + +
+

The libcult trace library provides a general-purpose +program tracing facility. The following code fragment can be found +in libcult/examples/trace:

+ +
+struct foo {};
+
+std::ostream&
+operator<< (std::ostream& o, foo const&)
+{
+  return o << "::foo";
+}
+
+namespace trace = cult::trace;
+
+trace::stream tout ("main", 4);
+
+int
+main ()
+{
+  using trace::record;
+
+  trace::log::instance ().level (9);
+
+  record a ("main", 2);
+  a << "notationally burdensome";
+  tout << a;
+
+  record b ("main", 2);
+  tout << (b << "a bit better, but still burdensome");
+
+  tout << (record ("main", 2) << "this is"
+           << " somewhat"
+           << " twisted but nice to be able to");
+
+  tout << "concise, using default level";
+
+  tout << 9 << "concise, using custom level";
+
+  foo f;
+
+  tout << 3 << f << " " << 5;
+}
+
+ +

Along with the proper implementation, a null implementation is +provided which can be used to completely optimize trace code away. For details +see the +Inlining code away essay.

+
+ +
+

Copyright © 2005-2010 Boris Kolpackov.

+ +
+Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU Free +Documentation License, version 1.2; with no Invariant Sections, no +Front-Cover Texts and no Back-Cover Texts. +
+
+ + + diff --git a/libcult/documentation/types/index.xhtml b/libcult/documentation/types/index.xhtml new file mode 100644 index 0000000..07cb7db --- /dev/null +++ b/libcult/documentation/types/index.xhtml @@ -0,0 +1,56 @@ + + + + + + + + + libcult/documentation/types + + + + + + + + + + + + + + +
+

The libcult type library provides convenience aliases +for basic c++ types (e.g., wchar and size) +as well as a set of fixed-size integer types.

+
+ +
+

Copyright © 2005-2010 Boris Kolpackov.

+ +
+Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU Free +Documentation License, version 1.2; with no Invariant Sections, no +Front-Cover Texts and no Back-Cover Texts. +
+
+ + + -- cgit v1.2.3