Compare commits
No commits in common. "master" and "fix-processor" have entirely different histories.
master
...
fix-proces
|
@ -4,7 +4,7 @@
|
|||
!v!Pluie.Berel.Meta meta :
|
||||
keys :
|
||||
software : pluie-yaml; <https://git.pluie.org/pluie/lib-yaml>
|
||||
version : 0.60
|
||||
version : 0.56
|
||||
type : library
|
||||
date : 2018
|
||||
license : GPLv3.0; <http://www.gnu.org/licenses/>
|
||||
|
@ -38,7 +38,6 @@
|
|||
- vala :
|
||||
dir :
|
||||
- src
|
||||
- samples
|
||||
extension :
|
||||
- .vala
|
||||
- .c
|
||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -2,7 +2,3 @@ build/
|
|||
bin/
|
||||
doc/
|
||||
pluie-yaml-*.tar.gz
|
||||
.geany
|
||||
docfix*
|
||||
docsvg.tar.gz
|
||||
tag-generated.yml
|
||||
|
|
27
README.md
27
README.md
|
@ -45,32 +45,15 @@ sudo ninja install -C build
|
|||
## Compilation
|
||||
|
||||
```
|
||||
valac --pkg glib-2.0 \
|
||||
--pkg gobject-2.0 \
|
||||
--pkg gmodule-2.0 \
|
||||
--pkg gio-2.0 \
|
||||
--pkg gee-0.8 \
|
||||
--pkg pluie-echo-0.2 \
|
||||
--pkg pluie-yaml-0.4 \
|
||||
main.vala
|
||||
valac --pkg pluie-echo-0.2 --pkg pluie-yaml-0.4 main.vala
|
||||
```
|
||||
|
||||
You can use `./build.sh` to rebuild/install the **pluie-yaml** lib and compile samples files
|
||||
|
||||
```
|
||||
# rebuild lib + build all samples
|
||||
./build.sh
|
||||
# rebuild lib + build only single sample (give sample file name without extension)
|
||||
./build.sh yaml-serialize
|
||||
# rebuild lib in local mode
|
||||
# local mode avoid to rebuild when modifying yaml files in resources dir
|
||||
# must be in the root directory
|
||||
./build.sh yaml-serialize 1
|
||||
```
|
||||
|
||||
## Api / Documentation
|
||||
|
||||
https://pluie.org/pluie-yaml-0.6/index.htm
|
||||
https://pluie.org/pluie-yaml-0.5/index.htm
|
||||
|
||||
|
||||
## Docker
|
||||
|
@ -396,9 +379,9 @@ Once your class has this glue, you can deal with complex object and populate the
|
|||
directly from yaml files.
|
||||
|
||||
for more details see :
|
||||
* `src/vala/Pluie/Samples.YamlObject.vala`
|
||||
* `src/vala/Pluie/Samples.YamlChild.vala`
|
||||
* `src/vala/Pluie/Samples.YamlStruct.vala`
|
||||
* `src/vala/Pluie/Yaml.Example.vala`
|
||||
* `src/vala/Pluie/Yaml.ExampleChild.vala`
|
||||
* `src/vala/Pluie/Yaml.ExampleStruct.vala`
|
||||
* `samples/yaml-tag.vala`
|
||||
|
||||
code from samples/yaml-tag.vala :
|
||||
|
|
13
build.sh
13
build.sh
|
@ -2,7 +2,7 @@
|
|||
#^# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
# @version : 0.60
|
||||
# @version : 0.56
|
||||
# @type : library
|
||||
# @date : 2018
|
||||
# @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
# --------------------------------------------------------
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
lib="pluie-yaml-0.6"
|
||||
lib="pluie-yaml-0.5"
|
||||
samples=" src/vala/Pluie/Samples.YamlObject.vala \
|
||||
src/vala/Pluie/Samples.YamlChild.vala \
|
||||
src/vala/Pluie/Samples.YamlStruct.vala "
|
||||
|
@ -65,11 +65,6 @@ function build.lib()
|
|||
cd "$DIR"
|
||||
build.title "$lib LIB BUILD"
|
||||
meson --prefix=/usr ./ build
|
||||
if [ "$1" -eq 1 ]; then
|
||||
meson configure -DLOCAL=true build
|
||||
else
|
||||
meson configure -DLOCAL=false build
|
||||
fi
|
||||
if [ "$UID" != "0" ]; then
|
||||
sudo ninja -v install -C build
|
||||
else
|
||||
|
@ -117,10 +112,10 @@ function build.main()
|
|||
if [ ! -z "$1" ]; then
|
||||
onefile="./samples/$1.vala"
|
||||
fi
|
||||
build.lib "$2"
|
||||
build.lib
|
||||
if [ $? -eq 0 ]; then
|
||||
build.samples $onefile
|
||||
fi
|
||||
}
|
||||
|
||||
build.main "$1" "${2:-0}"
|
||||
build.main "$1"
|
||||
|
|
BIN
lastpluie-yaml-0.5.tar.gz
Normal file
BIN
lastpluie-yaml-0.5.tar.gz
Normal file
Binary file not shown.
17
meson.build
17
meson.build
|
@ -1,7 +1,7 @@
|
|||
#^# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
# @version : 0.60
|
||||
# @version : 0.56
|
||||
# @type : library
|
||||
# @date : 2018
|
||||
# @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
@ -27,7 +27,7 @@
|
|||
#
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #^#
|
||||
|
||||
project('pluie-yaml', ['vala', 'c'], version:'0.6')
|
||||
project('pluie-yaml', ['vala', 'c'], version:'0.5')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
version = meson.project_version()
|
||||
|
@ -38,14 +38,10 @@ incdir = join_paths(get_option('prefix'), get_option('includedir'), 'plui
|
|||
conf = configuration_data()
|
||||
conf.set('VERSION' , version)
|
||||
conf.set('INSTALL_PATH', bindir)
|
||||
if get_option('LOCAL')
|
||||
conf.set('DATA_PATH' , './resources')
|
||||
else
|
||||
conf.set('DATA_PATH' , datadir)
|
||||
endif
|
||||
conf.set('DATA_PATH' , datadir)
|
||||
|
||||
configure_file(
|
||||
input: 'src/vala/install.vala.in',
|
||||
input: 'src/install.vala',
|
||||
output: 'install.vala',
|
||||
configuration: conf
|
||||
)
|
||||
|
@ -64,12 +60,9 @@ install_data('resources/config/subdir/test.yml', install_dir : join_paths(datadi
|
|||
|
||||
subdir('src')
|
||||
|
||||
add_global_arguments('-D DEBUG', language : 'valac')
|
||||
|
||||
|
||||
libpluie_yaml = library(
|
||||
'pluie-yaml-' + version,
|
||||
src_files,
|
||||
src_files + [ 'build/install.vala' ],
|
||||
vala_header : 'pluie_yaml.h',
|
||||
vala_vapi : 'pluie-yaml-' +version+'.vapi',
|
||||
dependencies : [
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
option('LOCAL', type : 'boolean', value : false)
|
|
@ -73,10 +73,10 @@
|
|||
|
||||
product:
|
||||
- sku : BL394D
|
||||
quantity : 5
|
||||
quantity : 4
|
||||
description : Basketball
|
||||
price : 450.00
|
||||
- sku : BL394D
|
||||
quantity : 5
|
||||
quantity : 4
|
||||
description : Basketball
|
||||
price : 450.00
|
||||
|
|
|
@ -43,35 +43,3 @@
|
|||
tata : tatavalue4
|
||||
titi : 44
|
||||
tutu : 0
|
||||
!v!Gee.HashMap type_gee_hmap :
|
||||
- key : key1
|
||||
!v!Pluie.Samples.YamlChild val :
|
||||
toto : key1toto
|
||||
tata : kay1tata
|
||||
titi : 5
|
||||
tutu : 0
|
||||
- key : key2
|
||||
val :
|
||||
toto : key2toto
|
||||
tata : kay2tata
|
||||
titi : 46
|
||||
tutu : 1
|
||||
!v!Gee.HashMap type_gee_hmap2 :
|
||||
- !v!Pluie.Samples.YamlStruct key :
|
||||
red : !v!uint8 214
|
||||
green : !v!uint8 78
|
||||
blue : 153
|
||||
!v!Pluie.Samples.YamlChild val :
|
||||
toto : key1toto
|
||||
tata : kay1tata
|
||||
titi : 5
|
||||
tutu : 0
|
||||
- key :
|
||||
red : !v!uint8 82
|
||||
green : !v!uint8 109
|
||||
blue : 35
|
||||
val :
|
||||
toto : key2toto
|
||||
tata : kay2tata
|
||||
titi : 46
|
||||
tutu : 1
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
{
|
||||
"glossary": {
|
||||
"title": "example glossary",
|
||||
"GlossDiv": {
|
||||
"GlossDiv": {
|
||||
"title": "S",
|
||||
"GlossList": {
|
||||
"GlossList": {
|
||||
"GlossEntry": {
|
||||
"ID": "SGML",
|
||||
"SortAs": "SGML",
|
||||
"GlossTerm": "Standard Generalized Markup Language",
|
||||
"Acronym": "SGML",
|
||||
"Abbrev": "ISO 8879:1986",
|
||||
"GlossDef": {
|
||||
"SortAs": "SGML",
|
||||
"GlossTerm": "Standard Generalized Markup Language",
|
||||
"Acronym": "SGML",
|
||||
"Abbrev": "ISO 8879:1986",
|
||||
"GlossDef": {
|
||||
"para": "A meta-markup language, used to create markup languages such as DocBook.",
|
||||
"GlossSeeAlso": ["GML", "XML"]
|
||||
"GlossSeeAlso": ["GML", "XML"]
|
||||
},
|
||||
"GlossSee": "markup"
|
||||
"GlossSee": "markup"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
|
@ -69,7 +40,7 @@ int main (string[] args)
|
|||
var done = false;
|
||||
|
||||
of.title ("Pluie Yaml Library", Pluie.Yaml.VERSION, "a-sansara");
|
||||
Pluie.Yaml.DEBUG = true;
|
||||
Pluie.Yaml.DEBUG = false;
|
||||
var loader = new Yaml.Loader (path, true, true);
|
||||
if ((done = loader.done)) {
|
||||
var root = loader.get_nodes ();
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
|
@ -71,7 +42,6 @@ int main (string[] args)
|
|||
|
||||
of.title ("Pluie Yaml Library", Pluie.Yaml.VERSION, "a-sansara");
|
||||
Pluie.Yaml.DEBUG = false;
|
||||
Yaml.Loader.PACK_NESTED_ENTRIES = true;
|
||||
var loader = new Yaml.Loader (path, true, true);
|
||||
if ((done = loader.done)) {
|
||||
var root = loader.get_nodes ();
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
|
|
|
@ -1,31 +1,32 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.5
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @licence : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org/>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*/
|
||||
|
||||
using GLib;
|
||||
using Gee;
|
||||
|
@ -67,31 +68,6 @@ public void test_object(Samples.YamlObject obj)
|
|||
of.keyval(" tutu" , "%s (bool)" .printf(child.tutu.to_string ()));
|
||||
child.method_a ();
|
||||
}
|
||||
if (obj.type_gee_hmap != null) {
|
||||
of.keyval("type_gee_hmap", "(%s<%s, %s>)" .printf(obj.type_gee_hmap.get_type ().name (), obj.type_gee_hmap.key_type.name (), obj.type_gee_hmap.value_type.name ()));
|
||||
foreach (var child in obj.type_gee_hmap.entries) {
|
||||
of.echo(" == entry (%s) ==".printf(child.key));
|
||||
of.keyval(" toto" , "%s (string)" .printf(child.value.toto));
|
||||
of.keyval(" tapa" , "%s (string)" .printf(child.value.tata));
|
||||
of.keyval(" titi" , "%d (int)" .printf(child.value.titi));
|
||||
of.keyval(" tutu" , "%s (bool)" .printf(child.value.tutu.to_string ()));
|
||||
}
|
||||
}
|
||||
if (obj.type_gee_hmap2 != null) {
|
||||
of.keyval("type_gee_hmap", "(%s<%s, %s>)" .printf(obj.type_gee_hmap2.get_type ().name (), obj.type_gee_hmap2.key_type.name (), obj.type_gee_hmap2.value_type.name ()));
|
||||
foreach (var child in obj.type_gee_hmap2.entries) {
|
||||
of.echo(" == key ==");
|
||||
of.keyval(" obj :" , "%s" .printf(child.key.to_string ()));
|
||||
of.echo(" == val (%s) ==".printf(child.value.get_type ( ).name ()));
|
||||
of.keyval(" toto" , "%s (string)" .printf(child.value.toto));
|
||||
of.keyval(" tapa" , "%s (string)" .printf(child.value.tata));
|
||||
of.keyval(" titi" , "%d (int)" .printf(child.value.titi));
|
||||
of.keyval(" tutu" , "%s (bool)" .printf(child.value.tutu.to_string ()));
|
||||
}
|
||||
}
|
||||
else {
|
||||
of.echo ("hmap2 null");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
|
@ -70,7 +41,7 @@ int main (string[] args)
|
|||
var done = false;
|
||||
|
||||
of.title ("Pluie Yaml Library", Pluie.Yaml.VERSION, "a-sansara");
|
||||
Pluie.Yaml.DEBUG = false;
|
||||
Pluie.Yaml.DEBUG = true;
|
||||
Yaml.Object? obj = null;
|
||||
var config = new Yaml.Config (path, true);
|
||||
var root = config.root_node ();
|
||||
|
@ -129,31 +100,6 @@ int main (string[] args)
|
|||
child.method_a ();
|
||||
}
|
||||
}
|
||||
if (o.type_gee_hmap != null) {
|
||||
of.keyval("type_gee_hmap", "(%s<%s, %s>)" .printf(o.type_gee_hmap.get_type ().name (), o.type_gee_hmap.key_type.name (), o.type_gee_hmap.value_type.name ()));
|
||||
foreach (var child in o.type_gee_hmap.entries) {
|
||||
of.echo(" == entry (%s) ==".printf(child.key));
|
||||
of.keyval(" toto" , "%s (string)" .printf(child.value.toto));
|
||||
of.keyval(" tapa" , "%s (string)" .printf(child.value.tata));
|
||||
of.keyval(" titi" , "%d (int)" .printf(child.value.titi));
|
||||
of.keyval(" tutu" , "%s (bool)" .printf(child.value.tutu.to_string ()));
|
||||
}
|
||||
}
|
||||
if (o.type_gee_hmap2 != null) {
|
||||
of.keyval("type_gee_hmap", "(%s<%s, %s>)" .printf(o.type_gee_hmap2.get_type ().name (), o.type_gee_hmap2.key_type.name (), o.type_gee_hmap2.value_type.name ()));
|
||||
foreach (var child in o.type_gee_hmap2.entries) {
|
||||
of.echo(" == key ==");
|
||||
of.keyval(" obj :" , "%s" .printf(child.key.to_string ()));
|
||||
of.echo(" == val (%s) ==".printf(child.value.get_type ( ).name ()));
|
||||
of.keyval(" toto" , "%s (string)" .printf(child.value.toto));
|
||||
of.keyval(" tapa" , "%s (string)" .printf(child.value.tata));
|
||||
of.keyval(" titi" , "%d (int)" .printf(child.value.titi));
|
||||
of.keyval(" tutu" , "%s (bool)" .printf(child.value.tutu.to_string ()));
|
||||
}
|
||||
}
|
||||
else {
|
||||
of.echo ("hmap2 null");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
|
@ -135,7 +106,6 @@ int main (string[] args)
|
|||
Pluie.Yaml.DEBUG = false;
|
||||
var config = new Yaml.Config (path, true);
|
||||
var root = config.root_node ();
|
||||
root.display_childs ();
|
||||
root.first ().display_childs ();
|
||||
|
||||
of.action ("Yaml.Builder.from_node", root.first ().name);
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
* @author : a-Sansara <[dev]at[pluie]dot[org]>
|
||||
* @copyright : pluie.org <http://www.pluie.org>
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* This file is part of pluie-yaml.
|
||||
*
|
||||
* pluie-yaml is free software (free as in speech) : you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#^# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
# @version : 0.60
|
||||
# @version : 0.56
|
||||
# @type : library
|
||||
# @date : 2018
|
||||
# @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
@ -29,7 +29,6 @@
|
|||
|
||||
src_files = [
|
||||
'src/c/yaml.c',
|
||||
'build/install.vala',
|
||||
'src/vala/Pluie/Io.Reader.vala',
|
||||
'src/vala/Pluie/Io.InputChunkStream.vala',
|
||||
'src/vala/Pluie/Io.StreamLineMark.vala',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
@ -36,37 +36,35 @@ using Pluie;
|
|||
*/
|
||||
public class Pluie.Samples.YamlObject : Yaml.Object
|
||||
{
|
||||
public string myname { get; set; }
|
||||
public string type_string { get; set; }
|
||||
public int type_int { get; set; }
|
||||
public uint type_uint { get; set; }
|
||||
public float type_float { get; set; }
|
||||
public double type_double { get; set; }
|
||||
public char type_char { get; set; }
|
||||
public uchar type_uchar { get; set; }
|
||||
public unichar type_unichar { get; set; }
|
||||
public short type_short { get; set; }
|
||||
public ushort type_ushort { get; set; }
|
||||
public long type_long { get; set; }
|
||||
public ulong type_ulong { get; set; }
|
||||
public size_t type_size_t { get; set; }
|
||||
public ssize_t type_ssize_t { get; set; }
|
||||
public int8 type_int8 { get; set; }
|
||||
public uint8 type_uint8 { get; set; }
|
||||
public int16 type_int16 { get; set; }
|
||||
public uint16 type_uint16 { get; set; }
|
||||
public int32 type_int32 { get; set; }
|
||||
public uint32 type_uint32 { get; set; }
|
||||
public int64 type_int64 { get; set; }
|
||||
public uint64 type_uint64 { get; set; }
|
||||
public bool type_bool { get; set; }
|
||||
public Samples.YamlChild type_object { get; set; }
|
||||
public Yaml.NODE_TYPE type_enum { get; set; }
|
||||
public Samples.YamlStruct type_struct { get; set; }
|
||||
public Gee.ArrayList<double?> type_gee_al { get; set; }
|
||||
public Gee.ArrayList<Samples.YamlChild> type_gee_alobject { get; set; }
|
||||
public Gee.HashMap<string, Samples.YamlChild> type_gee_hmap { get; set; }
|
||||
public Gee.HashMap<YamlStruct?, Samples.YamlChild> type_gee_hmap2 { get; set; }
|
||||
public string myname { get; set; }
|
||||
public string type_string { get; set; }
|
||||
public int type_int { get; set; }
|
||||
public uint type_uint { get; set; }
|
||||
public float type_float { get; set; }
|
||||
public double type_double { get; set; }
|
||||
public char type_char { get; set; }
|
||||
public uchar type_uchar { get; set; }
|
||||
public unichar type_unichar { get; set; }
|
||||
public short type_short { get; set; }
|
||||
public ushort type_ushort { get; set; }
|
||||
public long type_long { get; set; }
|
||||
public ulong type_ulong { get; set; }
|
||||
public size_t type_size_t { get; set; }
|
||||
public ssize_t type_ssize_t { get; set; }
|
||||
public int8 type_int8 { get; set; }
|
||||
public uint8 type_uint8 { get; set; }
|
||||
public int16 type_int16 { get; set; }
|
||||
public uint16 type_uint16 { get; set; }
|
||||
public int32 type_int32 { get; set; }
|
||||
public uint32 type_uint32 { get; set; }
|
||||
public int64 type_int64 { get; set; }
|
||||
public uint64 type_uint64 { get; set; }
|
||||
public bool type_bool { get; set; }
|
||||
public Samples.YamlChild type_object { get; set; }
|
||||
public Yaml.NODE_TYPE type_enum { get; set; }
|
||||
public Samples.YamlStruct type_struct { get; set; }
|
||||
public Gee.ArrayList<double?> type_gee_al { get; set; }
|
||||
public Gee.ArrayList<Samples.YamlChild> type_gee_alobject { get; set; }
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -77,8 +75,7 @@ public class Pluie.Samples.YamlObject : Yaml.Object
|
|||
typeof (Samples.YamlObject),
|
||||
typeof (Samples.YamlChild),
|
||||
typeof (Samples.YamlStruct),
|
||||
typeof (Gee.ArrayList),
|
||||
typeof (Gee.HashMap)
|
||||
typeof (Gee.ArrayList)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -89,8 +86,6 @@ public class Pluie.Samples.YamlObject : Yaml.Object
|
|||
{
|
||||
this.type_gee_al = new Gee.ArrayList<double?> ();
|
||||
this.type_gee_alobject = new Gee.ArrayList<Samples.YamlChild> ();
|
||||
this.type_gee_hmap = new Gee.HashMap<string, Samples.YamlChild> ();
|
||||
this.type_gee_hmap2 = new Gee.HashMap<Samples.YamlStruct?, Samples.YamlChild> ();
|
||||
Yaml.Register.add_namespace("Gee", "Pluie.Samples");
|
||||
Dbg.msg ("%s (%s) instantiated".printf (this.yaml_name, this.get_type().name ()), Log.LINE, Log.FILE);
|
||||
}
|
||||
|
@ -122,24 +117,6 @@ public class Pluie.Samples.YamlObject : Yaml.Object
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (type == typeof (Gee.HashMap)) {
|
||||
Yaml.Mapping? c;
|
||||
foreach (var child in node) {
|
||||
c = child as Yaml.Mapping;
|
||||
switch (name) {
|
||||
case "type_gee_hmap":
|
||||
Value key = c.item ("key").val (typeof (string));
|
||||
var entry = (Samples.YamlChild) Yaml.Builder.from_node (c.item ("val"), typeof (Samples.YamlChild));
|
||||
this.type_gee_hmap.set((string) key, entry);
|
||||
break;
|
||||
case "type_gee_hmap2":
|
||||
var key = Samples.YamlStruct.from_yaml_node (c.item ("key"));
|
||||
var entry = (Samples.YamlChild) Yaml.Builder.from_node (c.item ("val"), typeof (Samples.YamlChild));
|
||||
this.type_gee_hmap2.set(key, entry);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
var obj = Yaml.Builder.from_node(node, type);
|
||||
if (name == "type_object") {
|
||||
|
@ -170,35 +147,9 @@ public class Pluie.Samples.YamlObject : Yaml.Object
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if (type == typeof (Gee.HashMap)) {
|
||||
switch (name) {
|
||||
case "type_gee_hmap" :
|
||||
Yaml.Object.objects_mapkstr_to_node (this.type_gee_hmap, name, parent);
|
||||
break;
|
||||
case "type_gee_hmap2" :
|
||||
this.hmap2_to_node (name, parent);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
base.populate_to_node (name, type, parent);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void hmap2_to_node (string name, Yaml.Node? parent = null)
|
||||
{
|
||||
of.echo (Log.METHOD);
|
||||
var node = new Yaml.Sequence (parent, name);
|
||||
node.tag = new Yaml.Tag (Yaml.Register.resolve_namespace_type(this.type_gee_hmap2.get_type ()), "v");
|
||||
var i = 0;
|
||||
foreach (var child in this.type_gee_hmap2.entries) {
|
||||
var entryNode = new Yaml.Mapping (node, "_%d".printf (i));
|
||||
entryNode.add (child.key.to_yaml_node ("key"));
|
||||
Yaml.Builder.to_node ((GLib.Object) child.value, entryNode, false, null, "val");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
@ -343,7 +343,7 @@ public class Pluie.Yaml.Node : Yaml.AbstractChild, Pluie.Yaml.Collection
|
|||
)
|
||||
: "",
|
||||
of.c (ECHO.OPTION).s ("]"),
|
||||
withTag && this.ntype.is_root () && (this as Yaml.Root) !=null ? (this as Yaml.Root).get_display_tag_directives () : ""
|
||||
withTag && this.ntype.is_root () ? (this as Yaml.Root).get_display_tag_directives () : ""
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
@ -127,53 +127,18 @@ public abstract class Pluie.Yaml.Object : GLib.Object
|
|||
*/
|
||||
public static Yaml.Node? objects_collection_to_node (Gee.Collection list, string name, Yaml.Node? parent = null)
|
||||
{
|
||||
of.echo (Log.METHOD);
|
||||
var node = new Yaml.Sequence (parent, name);
|
||||
node.tag = new Yaml.Tag (Yaml.Register.resolve_namespace_type(list.get_type ()), "v");
|
||||
var it = list.iterator ();
|
||||
var i = 0;
|
||||
while (it.next ()) {
|
||||
Yaml.Builder.to_node ((GLib.Object) it.get (), node, false, i++);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
/**
|
||||
* build an object Gee.HashMap<string, Yaml.Object> to a Yaml.Node
|
||||
* @param map the gee hashmap to transform
|
||||
* @param name name of map sequence node
|
||||
* @param parent parent node of the map
|
||||
* @return the resulting Yaml.Node
|
||||
*/
|
||||
public static Yaml.Node? objects_mapkstr_to_node (Gee.HashMap map, string name, Yaml.Node? parent = null)
|
||||
{
|
||||
var node = new Yaml.Sequence (parent, name);
|
||||
node.tag = new Yaml.Tag (Yaml.Register.resolve_namespace_type(map.get_type ()), "v");
|
||||
var i = 0;
|
||||
foreach (var child in map.entries) {
|
||||
var entryNode = new Yaml.Mapping (node, "_%d".printf (i++));
|
||||
new Yaml.Mapping.with_scalar (entryNode, "key", (string) child.key);
|
||||
Yaml.Builder.to_node ((GLib.Object) child.value, entryNode, false, null, "val");
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* build an object Gee.HashMap<string, Yaml.Object> to a Yaml.Node
|
||||
* @param map the gee hashmap to transform
|
||||
* @param name name of map sequence node
|
||||
* @param parent parent node of the map
|
||||
* @return the resulting Yaml.Node
|
||||
*/
|
||||
public static Yaml.Node? objects_mapobjects_to_node (Gee.HashMap map, string name, Yaml.Node? parent = null)
|
||||
{
|
||||
var node = new Yaml.Sequence (parent, name);
|
||||
node.tag = new Yaml.Tag (Yaml.Register.resolve_namespace_type(map.get_type ()), "v");
|
||||
var i = 0;
|
||||
foreach (var child in map.entries) {
|
||||
var entryNode = new Yaml.Mapping (node, "_%d".printf (i++));
|
||||
Yaml.Builder.to_node ((GLib.Object) child.key, entryNode, false, null, "key");
|
||||
Yaml.Builder.to_node ((GLib.Object) child.value, entryNode, false, null, "val");
|
||||
Yaml.Builder.to_node (
|
||||
(GLib.Object) it.get (),
|
||||
node,
|
||||
false,
|
||||
i++
|
||||
);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
@ -198,36 +198,30 @@ public class Pluie.Yaml.Processor
|
|||
break;
|
||||
}
|
||||
if (!this.begin) {
|
||||
if (this.event.evtype.is_sequence_start () || this.event.evtype.is_mapping_start ()) {
|
||||
this.begin = true;
|
||||
continue;
|
||||
}
|
||||
else if (this.event.evtype.is_document_start ()) {
|
||||
if (this.event.evtype.is_document_start ()) {
|
||||
this.begin = true;
|
||||
// to do
|
||||
this.event = this.next_event ();
|
||||
if (this.event.evtype.is_tag ()) {
|
||||
this.root.tag = new Yaml.Tag (this.event.data["suffix"], this.event.data["handle"].replace("!", ""));
|
||||
this.event = this.next_event ();
|
||||
}
|
||||
this.next_event ();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (this.event.evtype.is_anchor ()) {
|
||||
this.on_anchor ();
|
||||
}
|
||||
else if (this.event.evtype.is_alias ()) {
|
||||
this.on_alias ();
|
||||
}
|
||||
else if (this.event.evtype.is_mapping_end () || this.event.evtype.is_sequence_end ()) {
|
||||
if (this.event.evtype.is_mapping_end () || this.event.evtype.is_sequence_end ()) {
|
||||
this.on_block_end ();
|
||||
continue;
|
||||
}
|
||||
else if (this.event.evtype.is_key () && (this.event = this.get_value_key_event ()) != null) {
|
||||
if (this.event.evtype.is_key () && (this.event = this.get_value_key_event ()) != null) {
|
||||
this.on_key ();
|
||||
}
|
||||
else if (this.event.evtype.is_entry ()) {
|
||||
if (this.event.evtype.is_anchor ()) {
|
||||
this.event = this.next_event ();
|
||||
this.on_anchor ();
|
||||
}
|
||||
if (this.event.evtype.is_alias ()) {
|
||||
this.event = this.next_event ();
|
||||
this.on_alias ();
|
||||
}
|
||||
else if (this.event.evtype.is_entry ()) {
|
||||
this.on_entry ();
|
||||
}
|
||||
else if (this.event.evtype.is_mapping_start ()) {
|
||||
|
@ -281,7 +275,7 @@ public class Pluie.Yaml.Processor
|
|||
Yaml.Event? evt = null;
|
||||
if (this.iterator.has_next () && this.iterator.next ()) {
|
||||
evt = this.iterator.get ();
|
||||
Yaml.dbg (" >>>>> [EVENT event [%d] %s <<<<< %s".printf (this.indexEvt++, evt.evtype.infos (), Log.METHOD));
|
||||
Yaml.dbg (" 1>>>>> [EVENT event [%d] %s <<<<< %s".printf (this.indexEvt++, evt.evtype.infos (), Log.METHOD));
|
||||
}
|
||||
return evt;
|
||||
}
|
||||
|
@ -380,13 +374,31 @@ public class Pluie.Yaml.Processor
|
|||
*/
|
||||
private void on_block_end ()
|
||||
{
|
||||
if (this.prev_node.ntype.is_scalar () || (this.prev_node.ntype.is_single_pair () && this.prev_node.parent != null && this.prev_node.parent.ntype.is_mapping ())) {
|
||||
this.prev_node = this.prev_node.parent;
|
||||
Yaml.dbg (" ===== >> ON BLOCK END ===== ");
|
||||
Yaml.dbg (" - parent_node : %s (%s)".printf (this.parent_node.name, this.parent_node.ntype.infos ()));
|
||||
Yaml.dbg (" - prev_node : %s (%s - collection ? %s)".printf (this.prev_node.name, this.prev_node.ntype.infos (), this.prev_node.ntype.is_collection ().to_string ()));
|
||||
bool suite = true;
|
||||
if (this.prev_node.ntype.is_mapping () && this.prev_node.parent != null && this.prev_node.parent.ntype.is_sequence ()) {
|
||||
if (!(this.prev_node.parent as Yaml.Sequence).close_block) {
|
||||
(this.prev_node.parent as Yaml.Sequence).close_block = true;
|
||||
Yaml.dbg (" SET FALSE SUITE");
|
||||
//~ suite = false;
|
||||
}
|
||||
}
|
||||
this.parent_node = this.prev_node.parent != null && this.prev_node.parent != this.root
|
||||
? this.prev_node.parent
|
||||
: this.root;
|
||||
this.prev_node = this.parent_node;
|
||||
if (suite) {
|
||||
Yaml.dbg (" SUITE");
|
||||
if (this.prev_node.ntype.is_scalar () || (this.prev_node.ntype.is_single_pair () && this.prev_node.parent != null && this.prev_node.parent.ntype.is_mapping ())) {
|
||||
this.prev_node = this.prev_node.parent;
|
||||
}
|
||||
this.parent_node = this.prev_node.parent != null && this.prev_node.parent != this.root
|
||||
? this.prev_node.parent
|
||||
: this.root;
|
||||
this.prev_node = this.parent_node;
|
||||
}
|
||||
Yaml.dbg (" - parent_node : %s (%s)".printf (this.parent_node.name, this.parent_node.ntype.infos ()));
|
||||
Yaml.dbg (" - prev_node : %s (%s - collection ? %s)".printf (this.prev_node.name, this.prev_node.ntype.infos (), this.prev_node.ntype.is_collection ().to_string ()));
|
||||
Yaml.dbg (this.prev_node.to_string ());
|
||||
Yaml.dbg (" ===== << ON BLOCK END ====================== ");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -438,12 +450,34 @@ public class Pluie.Yaml.Processor
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void on_value ()
|
||||
{
|
||||
var e = this.get_next_event();
|
||||
if (e.evtype.is_scalar ()) {
|
||||
this.event = this.next_event ();
|
||||
this.on_tag (false);
|
||||
this.node = new Yaml.Scalar (this.parent_node, this.event.data["data"]);
|
||||
this.change = true;
|
||||
}
|
||||
else if (e.evtype.is_anchor ()) {
|
||||
this.event = this.next_event ();
|
||||
this.on_anchor ();
|
||||
}
|
||||
else if (e.evtype.is_alias ()) {
|
||||
this.event = this.next_event ();
|
||||
this.on_alias ();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void on_scalar (bool entry = false)
|
||||
{
|
||||
if (this.ckey != null && this.parent_node.ntype.is_collection ()) {
|
||||
if (this.ckey != null && this.parent_node.ntype.is_mapping ()) {
|
||||
this.node = new Yaml.Mapping.with_scalar (this.parent_node, this.ckey, this.event.data["data"]);
|
||||
}
|
||||
else {
|
||||
|
@ -457,9 +491,7 @@ public class Pluie.Yaml.Processor
|
|||
*/
|
||||
private void on_anchor ()
|
||||
{
|
||||
if (this.event.data != null) {
|
||||
this.idAnchor = this.event.data["id"];
|
||||
}
|
||||
this.idAnchor = this.event.data["id"];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -467,14 +499,12 @@ public class Pluie.Yaml.Processor
|
|||
*/
|
||||
private void on_alias ()
|
||||
{
|
||||
if (this.event.data != null) {
|
||||
this.idAnchor = this.event.data["id"];
|
||||
Yaml.Node? refnode = this.anchors.get(this.idAnchor);
|
||||
if (refnode != null) {
|
||||
this.node = refnode.clone_node (this.ckey);
|
||||
this.parent_node.add (this.node);
|
||||
this.prev_node = this.node;
|
||||
}
|
||||
this.idAnchor = this.event.data["id"];
|
||||
Yaml.Node? refnode = this.anchors.get(this.idAnchor);
|
||||
if (refnode != null) {
|
||||
this.node = refnode.clone_node (this.ckey);
|
||||
this.parent_node.add (this.node);
|
||||
this.prev_node = this.node;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -485,6 +515,7 @@ public class Pluie.Yaml.Processor
|
|||
{
|
||||
this.node = new Yaml.Sequence (this.parent_node, this.ckey);
|
||||
this.change = true;
|
||||
//~ this.beginFlowSeq = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -499,8 +530,10 @@ public class Pluie.Yaml.Processor
|
|||
this.on_tag (true);
|
||||
if (this.event.evtype.is_scalar ()) {
|
||||
this.ckey = this.event.data["data"];
|
||||
Yaml.dbg (" >> node name : %s".printf (this.ckey));
|
||||
}
|
||||
var e = this.get_next_value_event();
|
||||
//~ Yaml.dbg (e.evtype.infos ());
|
||||
if (e!=null) {
|
||||
if ( e.evtype.is_sequence_start ()) {
|
||||
this.on_sequence_start ();
|
||||
|
@ -529,8 +562,10 @@ public class Pluie.Yaml.Processor
|
|||
*/
|
||||
private void add_anchor_if_needed ()
|
||||
{
|
||||
if (this.idAnchor != null && this.node != null) {
|
||||
this.anchors.set(this.idAnchor, this.node);
|
||||
if (this.idAnchor != null) {
|
||||
if (this.node != null) {
|
||||
this.anchors.set(this.idAnchor, this.node);
|
||||
}
|
||||
this.idAnchor = null;
|
||||
}
|
||||
}
|
||||
|
@ -544,7 +579,6 @@ public class Pluie.Yaml.Processor
|
|||
Yaml.dbg (Log.METHOD);
|
||||
Yaml.dbg (this.node.name);
|
||||
Yaml.dbg (this.node.ntype.infos ());
|
||||
Yaml.dbg ("anchor ? %s".printf (this.idAnchor));
|
||||
}
|
||||
if (this.change) {
|
||||
if (this.node.parent.ntype.is_sequence ()) {
|
||||
|
@ -578,7 +612,6 @@ public class Pluie.Yaml.Processor
|
|||
this.isEntryMapping = false;
|
||||
this.change = false;
|
||||
this.isEntry = false;
|
||||
this.ckey = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*^* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
* @version : 0.60
|
||||
* @version : 0.56
|
||||
* @type : library
|
||||
* @date : 2018
|
||||
* @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
@ -100,9 +100,7 @@ namespace Pluie.Yaml
|
|||
}
|
||||
|
||||
/**
|
||||
* serialize an object as a yaml compressed document data
|
||||
* @param obj the object to serialize
|
||||
* @param dest path destination if you want to write to a file
|
||||
*
|
||||
*/
|
||||
public static uint8[] serialize (GLib.Object? obj, string? dest = null)
|
||||
{
|
||||
|
@ -139,8 +137,7 @@ namespace Pluie.Yaml
|
|||
}
|
||||
|
||||
/**
|
||||
* deserialize yaml compressed document data to a Yaml.Object
|
||||
* @param zdata the data to deserialized
|
||||
*
|
||||
*/
|
||||
public static Yaml.Root deserialize (uint8[] zdata)
|
||||
{
|
||||
|
@ -330,14 +327,6 @@ namespace Pluie.Yaml
|
|||
return this == EVT.DOCUMENT_START;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return event is stream start event
|
||||
*/
|
||||
public bool is_stream_start ()
|
||||
{
|
||||
return this == EVT.STREAM_START;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -439,7 +428,7 @@ namespace Pluie.Yaml
|
|||
}
|
||||
|
||||
/**
|
||||
*@return a universal unique identifier (type 4)
|
||||
*@return universal infos related to NODE_TYPE
|
||||
*/
|
||||
public string uuid ()
|
||||
{
|
||||
|
|
17
valadoc.sh
17
valadoc.sh
|
@ -2,7 +2,7 @@
|
|||
#^# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
||||
# @version : 0.60
|
||||
# @version : 0.56
|
||||
# @type : library
|
||||
# @date : 2018
|
||||
# @license : GPLv3.0 <http://www.gnu.org/licenses/>
|
||||
|
@ -29,20 +29,13 @@
|
|||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #^#
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
lib="pluie-yaml-0.6"
|
||||
lib="pluie-yaml-0.5"
|
||||
cd $DIR
|
||||
valadoc --package-name=$lib --verbose --force --deps -o ./doc --pkg gee-0.8 --pkg gio-2.0 --pkg gobject-2.0 --pkg gmodule-2.0 --pkg glib-2.0 --pkg pluie-echo-0.2 ./src/vala/Pluie/*.vala ./build/install.vala
|
||||
valadoc --package-name=$lib --verbose --force --deps -o ./doc --pkg gee-0.8 --pkg gio-2.0 --pkg gobject-2.0 --pkg gmodule-2.0 --pkg glib-2.0 --pkg pluie-echo-0.2 ./src/vala/Pluie/*.vala ./src/install.vala
|
||||
if [ $? -eq 0 ]; then
|
||||
rm doc/*.png
|
||||
cp resources/doc-scripts.js ./doc/scripts.js
|
||||
cp resources/doc-style.css ./doc/style.css
|
||||
if [ -f "./docfix" ]; then
|
||||
./docfix
|
||||
if [ $? -eq 0 ]; then
|
||||
rm $lib.tar.gz
|
||||
tar -czvf $lib.tar.gz doc/
|
||||
scp $lib.tar.gz pluie@pluie.org:/home/pluie/
|
||||
ssh pluie@pluie.org "./updatedoc.sh $lib"
|
||||
fi
|
||||
fi
|
||||
#~ rm $lib.tar.gz
|
||||
#~ tar -czvf $lib.tar.gz doc/
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user