mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-16 07:48:44 +01:00
Repaired split index entries, added icmake/svnclean for local use
git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@120 f6dd340e-d3f9-0310-b409-bdd246841980
This commit is contained in:
parent
e7cbd0fd63
commit
2c33663be7
8 changed files with 47 additions and 14 deletions
|
@ -9,7 +9,10 @@ Converting .yo to .html
|
|||
|
||||
yodl2html --no-warnings -l3 cplusplus
|
||||
|
||||
[ $? == 0 ] || (echo html conversion failed; exit 1)
|
||||
if [ $? != 0 ] ; then
|
||||
echo html conversion failed
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "
|
||||
Moving .html files to ../html
|
||||
|
@ -37,7 +40,10 @@ Constructing the html-index.
|
|||
|
||||
../bin/htmlindex # construct index page
|
||||
|
||||
[ $? == 0 ] || (echo index construction not without errors; exit 1)
|
||||
if [ $? != 0 ] ; then
|
||||
echo index construction not without errors
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo 1>&2 "
|
||||
|
|
|
@ -4,6 +4,9 @@ cd ../yo
|
|||
|
||||
yodl2txt --no-warnings -l3 cplusplus
|
||||
|
||||
[ $? == 0 ] || (echo text conversion failed; exit 1)
|
||||
if [ $? != 0 ] ; then
|
||||
echo text conversion failed
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv cplusplus.txt ../zip
|
||||
|
|
|
@ -4,7 +4,10 @@ cd ../yo
|
|||
|
||||
yodl2latex cplusplus
|
||||
|
||||
[ $? == 0 ] || (echo latex conversion failed; exit 1)
|
||||
if [ $? != 0 ] ; then
|
||||
echo latex conversion failed
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv cplusplus.latex ../latex
|
||||
|
||||
|
|
5
build
5
build
|
@ -14,6 +14,7 @@ string
|
|||
#include "icmake/man"
|
||||
#include "icmake/docs"
|
||||
#include "icmake/install"
|
||||
#include "icmake/svnclean"
|
||||
|
||||
void main(int argc, list argv, list envp)
|
||||
{
|
||||
|
@ -35,6 +36,9 @@ void main(int argc, list argv, list envp)
|
|||
exit(0);
|
||||
}
|
||||
|
||||
if (option == "svnclean")
|
||||
svnclean();
|
||||
|
||||
if (option == "docs")
|
||||
docs();
|
||||
|
||||
|
@ -64,6 +68,7 @@ void main(int argc, list argv, list envp)
|
|||
" below <base>\n"
|
||||
" man - build the manual page (requires Yodl)\n"
|
||||
" programs - build support programs\n"
|
||||
" svnclean - clean remnants of locally run ./bin/ scripts\n"
|
||||
"\n"
|
||||
);
|
||||
exit(1);
|
||||
|
|
13
icmake/svnclean
Normal file
13
icmake/svnclean
Normal file
|
@ -0,0 +1,13 @@
|
|||
void svnclean()
|
||||
{
|
||||
run("rm -f script.log {yo,html,latex}/legal.shtml html/cplusplus*.html");
|
||||
run("rm -f html/target.shtml html/contents.html html/index.html");
|
||||
run("rm -f html/cppindex.html html/cplusplus.index");
|
||||
run("rm -f latex/*.{log,toc,aux,out,ind,ilg,idx,dvi,latex}");
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -55,11 +55,12 @@ functionality, just extra code. Clearly this code duplication is superfluous:
|
|||
a tt(Land) should em(be) a tt(Vehicle); it should not em(contain)
|
||||
a tt(Vehicle).
|
||||
|
||||
The intended relationship is achieved better by i(inheritance). A i(rule
|
||||
of thumb) for choosing between inheritance and composition distinguishes
|
||||
between em(is-a) and em(has-a) relationships. A truck em(is) a vehicle, so
|
||||
Truck should probably derive from Vehicle. On the other hand, a truck em(has)
|
||||
an engine; if you need to model engines in your system, you should probably
|
||||
The intended relationship is achieved better by i(inheritance).
|
||||
A i(rule of thumb)
|
||||
for choosing between inheritance and composition distinguishes between
|
||||
em(is-a) and em(has-a) relationships. A truck em(is) a vehicle, so Truck
|
||||
should probably derive from Vehicle. On the other hand, a truck em(has) an
|
||||
engine; if you need to model engines in your system, you should probably
|
||||
express this by composing an Engine class with the Truck class.
|
||||
|
||||
Following the above rule, tt(Land) is em(derived) from tt(Vehicle), in which
|
||||
|
|
|
@ -18,10 +18,12 @@ to decouple the tt(stream) classes from the hi(device) devices they operate
|
|||
upon. The rationale here is to use an extra software layer between, on the one
|
||||
hand, the classes allowing us to communicate with the device and, on the other
|
||||
hand, the communication between the software and the devices themselves. This
|
||||
implements a emi(chain of command) which is seen regularly in i(software
|
||||
design): The em(chain of command) is considered a generic pattern for the
|
||||
construction of i(reusable software), encountered also in, e.g., the i(TCP/IP
|
||||
stack). A tt(streambuf) can be considered yet another example of the chain of
|
||||
implements a emi(chain of command) which is seen regularly in
|
||||
i(software design):
|
||||
The em(chain of command) is considered a generic pattern for the
|
||||
construction of i(reusable software), encountered also in, e.g., the
|
||||
i(TCP/IP stack).
|
||||
A tt(streambuf) can be considered yet another example of the chain of
|
||||
command pattern: here the program talks to tt(stream) objects, which in turn
|
||||
forward their requests to tt(streambuf) objects, which in turn communicate
|
||||
with the devices. Thus, as we will see shortly, we are now able to do in
|
||||
|
|
|
@ -31,7 +31,7 @@ called. By default emi(static binding) (or emi(early binding)) is used: the
|
|||
class types of objects, object pointers or object refences determine which
|
||||
member functions are called. Late binding is an inherently different (and
|
||||
somewhat slower) procdure since it is decided i(run-time), rather than
|
||||
i(compile-time) what function is called (see section ref(howpolymorphism) for
|
||||
i(compile-time) what function is called (see section ref(howpolymorfism) for
|
||||
details). As bf(C++) supports em(both) late- and early-binding bf(C++)
|
||||
programmers are offered an option in what kind of binding to use, and so
|
||||
choices can be optimized to the situations at hand. Many other languages
|
||||
|
|
Loading…
Reference in a new issue