summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/config/Make.rules1
-rw-r--r--cpp/doc/Makefile23
-rw-r--r--cpp/doc/images/caution.gifbin0 -> 1039 bytes
-rw-r--r--cpp/doc/images/home.gifbin0 -> 995 bytes
-rw-r--r--cpp/doc/images/important.gifbin0 -> 1081 bytes
-rw-r--r--cpp/doc/images/next.gifbin0 -> 964 bytes
-rw-r--r--cpp/doc/images/note.gifbin0 -> 1070 bytes
-rw-r--r--cpp/doc/images/prev.gifbin0 -> 944 bytes
-rw-r--r--cpp/doc/images/tip.gifbin0 -> 1029 bytes
-rw-r--r--cpp/doc/images/toc-blank.gifbin0 -> 95 bytes
-rw-r--r--cpp/doc/images/toc-minus.gifbin0 -> 843 bytes
-rw-r--r--cpp/doc/images/toc-plus.gifbin0 -> 846 bytes
-rw-r--r--cpp/doc/images/up.gifbin0 -> 922 bytes
-rw-r--r--cpp/doc/images/warning.gifbin0 -> 1052 bytes
-rw-r--r--cpp/doc/manual.sgml244
-rw-r--r--cpp/src/slice2docbook/Gen.cpp46
16 files changed, 168 insertions, 146 deletions
diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules
index 96824b60820..cb471932ef1 100644
--- a/cpp/config/Make.rules
+++ b/cpp/config/Make.rules
@@ -28,6 +28,7 @@ LDFLAGS = -L$(libdir) -L$(STLPORT)/lib -L$(JTC)/lib
BASELIBS = -lstlport_gcc_debug -lJTC -lpthread
LIBS = -lIce $(BASELIBS)
SLICE = $(bindir)/slice2cpp
+SLICE2DOCBOOK = $(bindir)/slice2docbook
EVERYTHING = all depend clean
diff --git a/cpp/doc/Makefile b/cpp/doc/Makefile
index 9938f620c0e..246584afb97 100644
--- a/cpp/doc/Makefile
+++ b/cpp/doc/Makefile
@@ -13,15 +13,32 @@ top_srcdir = ..
TARGETS = manual/index.html \
manual.pdf
+SLICEFILES = ../slice/Ice/Communicator.ice \
+ ../slice/Ice/Logger.ice \
+ ../slice/Ice/ObjectAdapter.ice \
+ ../slice/Ice/Pickler.ice \
+ ../slice/Ice/Properties.ice \
+ ../slice/Ice/ValueFactory.ice
+
include $(top_srcdir)/config/Make.rules
-manual/index.html: manual.sgml
+manual/index.html: manual.sgml reference.sgml
rm -rf manual
db2html manual.sgml
+ (mkdir manual/stylesheet-images; \
+ cd manual/stylesheet-images; \
+ ln -s ../../images/*.gif .)
-manual.pdf: manual.sgml
+manual.pdf: manual.sgml reference.sgml
rm -rf manual.pdf
db2pdf manual.sgml
clean::
- rm -rf manual manual.out manual.texi \ No newline at end of file
+ rm -rf manual manual.out manual.texi
+
+reference.sgml: $(SLICEFILES) $(SLICE2DOCBOOK)
+ rm -f $@
+ $(SLICE2DOCBOOK) -I$(top_srcdir)/slice $@ $(SLICEFILES)
+
+clean::
+ rm -f reference.sgml
diff --git a/cpp/doc/images/caution.gif b/cpp/doc/images/caution.gif
new file mode 100644
index 00000000000..9cc2e155744
--- /dev/null
+++ b/cpp/doc/images/caution.gif
Binary files differ
diff --git a/cpp/doc/images/home.gif b/cpp/doc/images/home.gif
new file mode 100644
index 00000000000..55e1d5993fc
--- /dev/null
+++ b/cpp/doc/images/home.gif
Binary files differ
diff --git a/cpp/doc/images/important.gif b/cpp/doc/images/important.gif
new file mode 100644
index 00000000000..25e40c76b57
--- /dev/null
+++ b/cpp/doc/images/important.gif
Binary files differ
diff --git a/cpp/doc/images/next.gif b/cpp/doc/images/next.gif
new file mode 100644
index 00000000000..8c502e740a7
--- /dev/null
+++ b/cpp/doc/images/next.gif
Binary files differ
diff --git a/cpp/doc/images/note.gif b/cpp/doc/images/note.gif
new file mode 100644
index 00000000000..7322e8e40bd
--- /dev/null
+++ b/cpp/doc/images/note.gif
Binary files differ
diff --git a/cpp/doc/images/prev.gif b/cpp/doc/images/prev.gif
new file mode 100644
index 00000000000..0894d9ecb26
--- /dev/null
+++ b/cpp/doc/images/prev.gif
Binary files differ
diff --git a/cpp/doc/images/tip.gif b/cpp/doc/images/tip.gif
new file mode 100644
index 00000000000..f062955fa71
--- /dev/null
+++ b/cpp/doc/images/tip.gif
Binary files differ
diff --git a/cpp/doc/images/toc-blank.gif b/cpp/doc/images/toc-blank.gif
new file mode 100644
index 00000000000..6c65e3a194c
--- /dev/null
+++ b/cpp/doc/images/toc-blank.gif
Binary files differ
diff --git a/cpp/doc/images/toc-minus.gif b/cpp/doc/images/toc-minus.gif
new file mode 100644
index 00000000000..40ebe61e46a
--- /dev/null
+++ b/cpp/doc/images/toc-minus.gif
Binary files differ
diff --git a/cpp/doc/images/toc-plus.gif b/cpp/doc/images/toc-plus.gif
new file mode 100644
index 00000000000..3e9e7d55a3d
--- /dev/null
+++ b/cpp/doc/images/toc-plus.gif
Binary files differ
diff --git a/cpp/doc/images/up.gif b/cpp/doc/images/up.gif
new file mode 100644
index 00000000000..e899a272d0f
--- /dev/null
+++ b/cpp/doc/images/up.gif
Binary files differ
diff --git a/cpp/doc/images/warning.gif b/cpp/doc/images/warning.gif
new file mode 100644
index 00000000000..a5870799fb7
--- /dev/null
+++ b/cpp/doc/images/warning.gif
Binary files differ
diff --git a/cpp/doc/manual.sgml b/cpp/doc/manual.sgml
index b5a222f25a0..2440623240b 100644
--- a/cpp/doc/manual.sgml
+++ b/cpp/doc/manual.sgml
@@ -1,122 +1,122 @@
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
-<book><?dbhtml filename="index.html">
-<bookinfo>
-<title>Ice User's Manual</title>
-<subtitle>A Guide to the Internet Communications Engine</subtitle>
-<authorgroup>
-<author>
-<firstname>Marc</firstname>
-<surname>Laukien</surname>
-</author>
-</authorgroup>
-<publisher>
-<publishername>Mutable Realms, Inc.</publishername>
-<address>
-<city>Huntsville</city>
-<state>Alabama</state>
-<country>USA</country>
-</address>
-</publisher>
-<releaseinfo>Version 0.0.1</releaseinfo>
-<pubdate>Date to be inserted here...</pubdate>
-<legalnotice>
-<para>Legal stuff to be inserted here...</para>
-</legalnotice>
-<copyright>
-<year>2001</year>
-<holder>Mutable Realms, Inc. All rights reserved.</holder>
-</copyright>
-</bookinfo>
-<part>
-<title>Introduction</title>
-<chapter>
-<title>Getting Started with Ice</title>
-<para>
-TBD
-</para>
-</chapter>
-<chapter>
-<title>Writing Specifications with Slice</title>
-<section>
-<title>Modules</title>
-<para>
-TBD
-</para>
-</section>
-<section>
-<title>Classes</title>
-<para>
-TBD
-</para>
-</section>
-<section>
-<title>Interfaces</title>
-<para>
-TBD
-</para>
-</section>
-</chapter>
-<chapter>
-<title>The Slice to C++ Mapping</title>
-<para>
-TBD
-</para>
-<programlisting>
-int
-main(int argc, char* argv[])
-{
- int status;
- Ice::Communicator_ptr communicator;
-
- try
- {
- communicator = Ice::initialize(argc, argv); <co id="intro.main.init">
- status = run(argc, argv, communicator); <co id="intro.main.run">
- }
- catch(const Ice::LocalException& ex) <co id="intro.main.ex1">
- {
- cerr << ex << endl;
- status = EXIT_FAILURE;
- }
-
- if(communicator) <co id="intro.main.if">
- {
- try
- {
- communicator -> destroy(); <co id="intro.main.dest">
- }
- catch(const Ice::LocalException& ex) <co id="intro.main.ex2">
- {
- cerr << ex << endl;
- status = EXIT_FAILURE;
- }
- }
-
- return status; <co id="intro.main.return">
-}
-</programlisting>
-<calloutlist>
-<callout arearefs="intro.main.init">
-<para>
-blahblahblah
-</para>
-</callout>
-</calloutlist>
-</chapter>
-</part>
-<part>
-<title>Reference</title>
-<chapter>
-<title>Ice::Communicator</title>
-<para>
-TBD
-</para>
-</chapter>
-<chapter>
-<title>Ice::ObjectAdapter</title>
-<para>
-TBD
-</para>
-</chapter>
-</part>
-</book>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
+<!ENTITY reference SYSTEM "reference.sgml">
+]>
+<!--
+**********************************************************************
+Copyright (c) 2001
+MutableRealms, Inc.
+Huntsville, AL, USA
+
+All Rights Reserved
+**********************************************************************
+-->
+<book><?dbhtml filename="index.html">
+<bookinfo>
+<title>Ice User's Manual</title>
+<subtitle>A Guide to the Internet Communications Engine</subtitle>
+<authorgroup>
+<author>
+<firstname>Marc</firstname>
+<surname>Laukien</surname>
+</author>
+</authorgroup>
+<publisher>
+<publishername>Mutable Realms, Inc.</publishername>
+<address>
+<city>Huntsville</city>
+<state>Alabama</state>
+<country>USA</country>
+</address>
+</publisher>
+<releaseinfo>Version 0.0.1</releaseinfo>
+<pubdate>Date to be inserted here...</pubdate>
+<legalnotice>
+<para>Legal stuff to be inserted here...</para>
+</legalnotice>
+<copyright>
+<year>2001</year>
+<holder>Mutable Realms, Inc. All rights reserved.</holder>
+</copyright>
+</bookinfo>
+<part>
+<title>Introduction</title>
+<chapter>
+<title>Getting Started with Ice</title>
+<para>
+TBD
+</para>
+</chapter>
+<chapter>
+<title>Writing Specifications with Slice</title>
+<section>
+<title>Modules</title>
+<para>
+TBD
+</para>
+</section>
+<section>
+<title>Classes</title>
+<para>
+TBD
+</para>
+</section>
+<section>
+<title>Interfaces</title>
+<para>
+TBD
+</para>
+</section>
+</chapter>
+<chapter>
+<title>The Slice to C++ Mapping</title>
+<para>
+TBD
+</para>
+<programlisting>
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::Communicator_ptr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv); <co id="intro.main.init">
+ status = run(argc, argv, communicator); <co id="intro.main.run">
+ }
+ catch(const Ice::LocalException& ex) <co id="intro.main.ex1">
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if(communicator) <co id="intro.main.if">
+ {
+ try
+ {
+ communicator -> destroy(); <co id="intro.main.dest">
+ }
+ catch(const Ice::LocalException& ex) <co id="intro.main.ex2">
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status; <co id="intro.main.return">
+}
+</programlisting>
+<calloutlist>
+<callout arearefs="intro.main.init">
+<para>
+blahblahblah
+</para>
+</callout>
+</calloutlist>
+</chapter>
+</part>
+<part>
+<title>Reference</title>
+&reference;
+</part>
+</book>
diff --git a/cpp/src/slice2docbook/Gen.cpp b/cpp/src/slice2docbook/Gen.cpp
index 1a25859ed05..4402831102c 100644
--- a/cpp/src/slice2docbook/Gen.cpp
+++ b/cpp/src/slice2docbook/Gen.cpp
@@ -47,10 +47,10 @@ Slice::Gen::generate(const Unit_ptr& unit)
void
Slice::Gen::visitUnitStart(const Unit_ptr& p)
{
- O << "<!DOCTYPE book PUBLIC \"-//OASIS//DTD DocBook V3.1//EN\">";
- printHeader();
- start("book");
+// O << "<!DOCTYPE book PUBLIC \"-//OASIS//DTD DocBook V3.1//EN\">";
+// start("book");
+ printHeader();
start("chapter", "Global Module");
start("section", "Overview");
visitContainer(p);
@@ -59,7 +59,7 @@ Slice::Gen::visitUnitStart(const Unit_ptr& p)
void
Slice::Gen::visitUnitEnd(const Unit_ptr& p)
{
- end();
+// end();
}
void
@@ -504,15 +504,17 @@ void
Slice::Gen::printHeader()
{
static const char* header =
- "<!--\n"
- "Copyright (c) 2001\n"
- "MutableRealms, Inc.\n"
- "Huntsville, AL, USA\n"
- "\n"
- "All Rights Reserved\n"
- "\n"
- "Generated by the `slice2docbook' converter\n"
- "-->";
+"<!--\n"
+"**********************************************************************\n"
+"Copyright (c) 2001\n"
+"MutableRealms, Inc.\n"
+"Huntsville, AL, USA\n"
+"\n"
+"All Rights Reserved\n"
+"\n"
+"Generated by the `slice2docbook' converter\n"
+"**********************************************************************\n"
+"-->";
O.zeroIndent();
O << nl << header;
@@ -655,17 +657,15 @@ Slice::Gen::printComment(const Contained_ptr& p)
{
start("section", "See Also");
start("para");
- start("itemizedlist");
+ start("simplelist type=\"inline\"");
for(StringList::iterator p = see.begin();
p != see.end();
++p)
{
- start("listitem");
- start("para");
+ start("member");
O << nl << *p;
end();
- end();
}
end();
@@ -694,17 +694,20 @@ Slice::Gen::printSummary(const Contained_ptr& p)
void
Slice::Gen::start(const std::string& element)
{
- elementStack_.push(element);
O << nl << '<' << element << '>';
O.inc();
+
+ string::size_type pos = element.find_first_of(" \t");
+ if(pos == string::npos)
+ elementStack_.push(element);
+ else
+ elementStack_.push(element.substr(0, pos));
}
void
Slice::Gen::start(const std::string& element, const std::string& title)
{
- elementStack_.push(element);
- O << nl << '<' << element << '>';
- O.inc();
+ start(element);
start("title");
O << nl << title;
end();
@@ -715,6 +718,7 @@ Slice::Gen::end()
{
string element = elementStack_.top();
elementStack_.pop();
+
O.dec();
O << nl << "</" << element << '>';
}