Red-Black Trees are now used for duplicate detection, and planned

to be used for unordered map storage. This is because AAs still
don't work correctly and even if they did, require the user to
define both toHash and opCmp/opEquals for every YAML
struct/class. Now only opCmp needs to be defined.
Documentation/tutorials/examples have been updated accordingly.
This commit is contained in:
Ferdinand Majerech 2012-01-23 15:57:26 +01:00
parent 07eadc9403
commit 9596806644
34 changed files with 623 additions and 250 deletions

View file

@ -43,7 +43,7 @@ Do this by typing the following command into the console::
dmd cdc.d
Now you can use CDC to compile D:YAML.
Now compile D:YAML with CDC.
To do this on Unix/Linux, use the following command::
./cdc
@ -101,8 +101,8 @@ into the file:
Explanation of the code
^^^^^^^^^^^^^^^^^^^^^^^
First, we import the *yaml* module. This is the only module you need to import
to use D:YAML - it automatically imports all needed modules.
First, we import the *yaml* module. This is the only D:YAML module you need to
import - it automatically imports all needed modules.
Next we load the file using the *Loader.load()* method. *Loader* is a struct
used for parsing YAML documents. The *load()* method loads the file as
@ -146,18 +146,18 @@ formatted differently. Comments are not preserved, either.
Compiling
^^^^^^^^^
To compile your project, you must give DMD the directories containing import
modules and the library. You also need to tell it to link with D:YAML. The import
directory should be the D:YAML package directory. You can specify it using the
``-I`` option of DMD. The library directory should be where you put the compiled
D:YAML library. On Unix/Linux you can specify it using the ``-L-L`` option, and
link with D:YAML using the ``-L-l`` option. On Windows, the import directory is
used as the library directory. To link with the library on Windows, just add the
path to it relative to the current directory.
To compile your project, DMD needs to know which directories contain the
imported modules and the library. You also need to tell it to link with D:YAML.
The import directory should be the D:YAML package directory. You can specify it
using the ``-I`` option of DMD. The library directory should point to the
compiled library. On Unix/Linux you can specify it using the ``-L-L`` option,
and link with D:YAML using the ``-L-l`` option. On Windows, the import directory
is used as the library directory. To link with the library on Windows, just add
the path to it relative to the current directory.
For example, if you extracted and compiled D:YAML in ``/home/xxx/dyaml``, your
project is in ``/home/xxx/dyaml-project``, and you are currently in that
directory, you can compile the project with the following command on Unix/Linux::
directory, compile the project with the following command on Unix/Linux::
dmd -I../dyaml -L-L../dyaml -L-ldyaml main.d