summaryrefslogtreecommitdiff
path: root/doc/README
blob: 3511c048a018ecf5afe9fabe41ee9ed022b6d6cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Baltisot 0.1.0
~~~~~~~~~~~~~~

Hello, this is the library Baltisot. If you are reading this, you probably are
a developper and want to learn to use it. Before that, let's talk a bit about
what exactly Baltisot is.


Baltisot is a multiple purpose C++ library. I've written as much low level,
middle level and high level classes as possible. I've classified the classes:

 o  Low level:
Base       - Override memory allocations routines.
Exception  - Declines a few exceptions classes.
String     - A mere fool-prof String class.
Regex      - A class to compile and test regexes.
Variables  - A class that can store a variables table.

 o  Middle level:
Handle     - Encapsulate basic handles functions, has to be derivated:
  Input    - Open a file for input.
  Output   - Open a file for output.
  Buffer   - A virtual handle that reads and writes in memory. Foolproof.
  InPipe   - A pipe that redirect stdout.
  OutPipe  - A pipe that redirect stdin.
  Socket   - Implements all the socket functions.

 o  High level:
IRC        - An IRC client. Unworkable for now.
TaskMan    - A task manager. Handles some events occuring on tasks.
Task       - The primary task class handled by the task manager. Has to be derivated:
  CopyJob  - A task that can copy a handle to another.
  ReadJob  - A task that can read a handle line by line until a regex is matched.
  HttpServ - A Mini-Http server to design distibuted applications.
Action     - Actions from the Http server, has to be derivated:
  Confirm  - Show a yes/no confirmation window.
  Form     - An input form.
  Menu     - An actions menu.
  Message  - Display a simple message window.
  Table    - To show a table.


There is also general objects that can be used:
Stdio  - An input handle to read from stdio.
Stdout - An output handle to write to stdout.
Stderr - An output handle to write to stderr.

All the three objects still works even if the base handles are closed.

empty & any - Two basic regex.


You can now read the API file to know how to use each of the classes. As an
example, you can read the source from 'Main.cc' into the 'src' directory.

There is two little helpers functions into the 'src/misc.cc' file to generate HTTP
actions. GeneDeroul can read a handle and returns two String array to be used as
a pull down menu. The input handle can be seen as this:

----- begin -----
value1
Description 1
value2
Description 2


------ end ------

GeneList can create a string array to be used to create a table from a handle.
The input handle can be seen as this:

----- begin -----
cell 1, 1
cell 1, 2
cell 1, 3
cell 2, 1
cell 2, 2
cell 2, 3

------ end ------

You just give the number of columns.


The whole library is heavy based on the vector<T> class. But I think (and since
I did code most of those classes) that it sucks. Well, some of you will tell
that I exagerate and that the STL is a good library. So others will say that
there is better C++ libraries around. My answer is that Baltisot is a C++ test
for me. So I want to recode everything.

Time for you to read the API file :)