diff --git a/resources/doc-style.css b/resources/doc-style.css index 65c2c3f..12479a8 100644 --- a/resources/doc-style.css +++ b/resources/doc-style.css @@ -1,4 +1,4 @@ @import url('https://fonts.googleapis.com/css?family=family=Open+Sans:300,400%7CDroid+Serif:400%7CRoboto+Mono:400,500,700,400italic'); -*{font-family:"Open Sans","Droid Sans",Helvetica,sans-serif}a{outline:none!important}h2,h3{font-family:"Droid Serif",serif;font-weight:300}h3{font-size:15px;font-weight:300}body{margin:0}.main_optional_parameter{font-style:italic}.main_diagram{border-style:none;display:block;margin:0 auto}.site_navi{text-align:right}.main_notification{padding-right:10px;padding-left:60px;padding-bottom:5px;padding-top:5px;border-color:#aaf;background-color:#eef;border-style:solid;border-width:1px;margin:10px;min-height:48px;background-position:6px .5em;background-repeat:no-repeat;background-image:url(warning.svg)}.main_table{border-collapse:collapse;border:1px solid #aaf;background:#eef;margin-right:auto;margin-left:auto}.main_source,.main_sourcesample{background-color:#FAFAFA;border-radius:6px;font-family:"Roboto Mono",monospace;margin:12px;padding:12px}input{border-color:#aaf;border-style:solid;border-width:1px}.site_header{align-items:center;background-color:#403757;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);display:flex;font-size:24px;justify-content:space-between;padding:9px 6px;position:fixed;top:0;width:100%;z-index:1000;color:white}div{font-size:14px}.site_title{text-align:left;font-size:40px}div.site_footer{position:fixed;bottom:0;text-align:center;padding-bottom:5px;padding-top:5px;width:100%;background-color:#fafafa}div.site_body{font-size:10;margin-top:50px}#nav_content{overflow:auto;position:fixed;height:100%;width:240px;font-size:16px;background-color:#f7f6f8}div.site_navigation{float:left;width:240px;border-color:#eceaf0;border-style:solid;border-width:1px;margin-bottom:40px;background-color:#f7f6f8}.site_content{font-size:14px;margin-left:300px;margin-right:5px;padding-top:20px;text-align:left;padding-bottom:20px;}.main_type{text-decoration:none;font-style:italic;color:#000}.main_basic_type{text-decoration:none;font-weight:700;color:#2B9C5D}.main_keyword{text-decoration:none;font-weight:700;color:brown}.main_escape{text-decoration:none;color:#6a5acd}.xml_cdata{text-decoration:none;font-weight:400;color:#a020f0}.xml_escape{text-decoration:none;font-weight:400;color:#a020f0}.xml_element{text-decoration:none;font-weight:400;color:#008a8c}.xml_attribute{text-decoration:none;font-weight:700;color:#6a5acd}.xml_attribute_value{text-decoration:none;font-weight:400;color:#f0f}.xml_comment{text-decoration:none;font-weight:400;color:#0202ff}.main_source .main_literal{text-decoration:none;color:#2ba199}.main_comment{text-decoration:none;color:#888a85}.main_preprocessor{text-decoration:none;color:#ad7fa8}div.main_code_definition{background-color:#eee;border-radius:6px;font-family:"Roboto Mono",monospace;margin:12px;padding:12px}div.main_notification_block{padding-right:10px;padding-left:10px;padding-bottom:5px;padding-top:5px;border-color:#d08717;background-color:#fbf2c3;border-style:solid;border-width:1px;margin:10px}span.main_block_headline{background-image:url(tip.svg);background-repeat:no-repeat;background-position:center right;font-weight:700;display:block}div.main_block_content{margin-left:15px}span.leaf_code_definition{font-family:"Roboto Mono",monospace;font-size:15px;font-weight:200}div.leaf_brief_description{display:block;margin-left:40px}h1.main_title{font-size:20px;margin-bottom:0}h2.main_title{margin-bottom:0}h3.main_title{margin-bottom:0}.main_hr{border:0;color:#b4a0c1;background-color:#b4a0c1;height:1px;margin-top:6px;margin-bottom:6px}.main_parameter_table_unknown_parameter{color:GREY}.main_parameter_table_name,.main_errordomain_table_name,.main_enum_table_name{vertical-align:top;text-align:right;font-weight:700;width:120px;padding-right:10px}.main_parameter_table,.main_errordomain_table,.main_enum_table{margin-weight:20px;margin-left:20px}.description a.constant,.brief_description a.constant{background-image:url(constant.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.namespace,.brief_description a.namespace{background-image:url(namespace.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.struct,.brief_description a.struct{background-image:url(struct.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.interface,.brief_description a.interface{background-image:url(interface.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.enum,.brief_description a.enum{background-image:url(enum.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.errordomain,.brief_description a.errordomain{background-image:url(errordomain.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.delegate,.brief_description a.delegate{background-image:url(delegate.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.signal,.brief_description a.signal{background-image:url(signal.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.field,.brief_description a.field{background-image:url(field.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.enumvalue,.brief_description a.enumvalue{background-image:url(enumvalue.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.errorcode,.brief_description a.errorcode{background-image:url(errorcode.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.class,.brief_description a.class{background-image:url(class.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}a.abstract_class,.description a.abstract_class,.brief_description a.abstract_class{background-image:url(abstractclass.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0;font-style:italic}.description a.property,.brief_description a.property{background-image:url(property.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.virtual_property,.brief_description a.virtual_property{background-image:url(virtualproperty.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.abstract_property,.brief_description a.abstract_property{background-image:url(abstractproperty.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.method,.brief_description a.method{background-image:url(method.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.static_method,.brief_description a.static_method{background-image:url(staticmethod.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}a.virtual_method,.description a.virtual_method,.brief_description a.virtual_method{background-image:url(virtualmethod.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.abstract_method,.brief_description a.abstract_method{background-image:url(abstractmethod.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.creation_method,.brief_description a.creation_method{background-image:url(constructor.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.navi_main li,.navi_inline li{background-image:url(method.svg);background-repeat:no-repeat!important;background-position:left center!important;background-color:transparent;vertical-align:middle;list-style-type:none;margin:0;padding:0 0 0 20px;transition:all 0.5s ease-out}.navi_inline li{background-position:left 12px!important;padding:10px 0 10px 20px}.navi_main li.errorcode,.navi_inline li.errorcode{background-image:url(errorcode.svg)}.navi_main li.enumvalue,.navi_inline li.enumvalue{background-image:url(enumvalue.svg)}.navi_main li.abstract_class,.navi_inline li.abstract_class{background-image:url(abstractclass.svg)}.navi_main li.abstract_method,.navi_inline li.abstract_method{background-image:url(abstractmethod.svg)}.navi_main li.creation_method,.navi_inline li.creation_method,.main_list_m{background-image:url(constructor.svg)}.navi_main li.static_method,.navi_inline li.static_method{background-image:url(staticmethod.svg)}.navi_main li.package_index{background-image:url(packages.svg)}.navi_main li.virtual_method,.navi_inline li.virtual_method{background-image:url(virtualmethod.svg)}.navi_main li.errordomain,.navi_inline li.errordomain,.main_list_errdom{background-image:url(errordomain.svg)}.navi_main li.namespace,.navi_inline li.namespace,.main_list_ns{background-image:url(namespace.svg)}.navi_main li.method,.navi_inline li.method{background-image:url(method.svg)}.navi_main li.struct,.navi_inline li.struct,.main_list_stru{background-image:url(struct.svg)}.navi_main li.interface,.navi_inline li.interface,.main_list_iface{background-image:url(interface.svg)}.navi_main li.field,.navi_inline li.field,.main_list_field{background-image:url(field.svg)}.navi_main li.class,.navi_inline li.class,.main_list_cl{background-image:url(class.svg)}.navi_main li.enum,.navi_inline li.enum,.main_list_en{background-image:url(enum.svg)}.navi_main li.property,.navi_inline li.property,.main_list_prop{background-image:url(property.svg)}.navi_main li.abstract_property,.navi_inline li.abstract_property{background-image:url(abstractproperty.svg)}.navi_main li.virtual_property,.navi_inline li.virtual_property{background-image:url(virtualproperty.svg)}.navi_main li.delegate,.navi_inline li.delegate,.main_list_del{background-image:url(delegate.svg)}.navi_main li.signal,.navi_inline li.signal,.main_list_sig{background-image:url(signal.svg)}.navi_main li.package,.navi_inline li.package{background-image:url(package.svg)}.navi_main li.constant,.navi_inline li.constant{background-image:url(constant.svg)}.navi_main{margin-top:10px;margin-bottom:10px;padding-left:5px}.navi_main:last-child{padding-left:5px}.navi_hr{background-color:#dedede;border:0;border-top-width:0;border-bottom-width:0;border-top-style:none;border-bottom-style:none;border-top-color:currentcolor;border-bottom-color:currentcolor;border-bottom:1px solid #fff;border-top:1px solid #dedede;height:0;margin:6px 0}.navi_main a{text-decoration:none;color:#887E9C;line-height:26px;width:100%;display:inline-block;padding-left:0}a,.navi_inline a,a.external_link{text-decoration:none;color:#50A3BE;transition:all 0.5s ease-out}.navi_main li:hover{background-color:rgba(0,0,0,.1)}div.site_content .navi_main li:hover{background-color:transparent}a:hover,.navi_inline a:hover,a.external_link:hover,div.site_content .navi_main li a:hover{text-decoration:underline;color:#6A6576}.navi_main li:hover a{text-decoration:none}.navi_main .abstract_class>a,.navi_inline .abstract_class>a{font-style:italic}a.navi_link:hover,a.external_link:hover{text-decoration:underline}ul.no_bullet li{list-style-type:none}.navi_inline{}.css_content_literal{font-family:monospace;color:#ff01ff}code{font-family:monospace}.main_code_definition a,.leaf_code_definition a{text-decoration:none;color:inherit}.main_code_definition a:hover,.leaf_code_definition a:hover{text-decoration:underline}.box .headline{background-image:url(coll_open.svg);background-position:calc(100% - 1px) center;background-repeat:no-repeat;background-color:#eef;border-color:#aaf;border-style:solid;border-width:1px;margin:auto;width:90%;margin-top:20px;font-weight:700}.box .content{border-color:#aaf;border-width:0 1 1 1;border-style:solid;overflow:auto;display:none;margin:auto;width:90%}.box .column{float:left;width:33%}.package_note{}.deprecated{text-decoration:line-through} +*{font-family:"Open Sans","Droid Sans",Helvetica,sans-serif}a{outline:none!important}h2,h3{font-family:"Droid Serif",serif;font-weight:300}h3{font-size:15px;font-weight:300}body{margin:0}.main_optional_parameter{font-style:italic}.main_diagram{border-style:none;display:block;margin:0 auto}.site_navi{text-align:right}.main_notification{padding-right:10px;padding-left:60px;padding-bottom:5px;padding-top:5px;border-color:#aaf;background-color:#eef;border-style:solid;border-width:1px;margin:10px;min-height:48px;background-position:6px .5em;background-repeat:no-repeat;background-image:url(img/warning.svg)}.main_table{border-collapse:collapse;border:1px solid #aaf;background:#eef;margin-right:auto;margin-left:auto}.main_source,.main_sourcesample{background-color:#FAFAFA;border-radius:6px;font-family:"Roboto Mono",monospace;margin:12px;padding:12px}input{border-color:#aaf;border-style:solid;border-width:1px}.site_header{align-items:center;background-color:#403757;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);display:flex;font-size:24px;justify-content:space-between;padding:9px 6px;position:fixed;top:0;width:100%;z-index:1000;color:white}div{font-size:14px}.site_title{text-align:left;font-size:40px}div.site_footer{position:fixed;bottom:0;text-align:center;padding-bottom:5px;padding-top:5px;width:100%;background-color:#fafafa}div.site_body{font-size:10;margin-top:50px}#nav_content{overflow:auto;position:fixed;height:100%;width:240px;font-size:16px;background-color:#f7f6f8}div.site_navigation{float:left;width:240px;border-color:#eceaf0;border-style:solid;border-width:1px;margin-bottom:40px;background-color:#f7f6f8}.site_content{font-size:14px;margin-left:300px;margin-right:5px;padding-top:20px;text-align:left;padding-bottom:20px;}.main_type{text-decoration:none;font-style:italic;color:#000}.main_basic_type{text-decoration:none;font-weight:700;color:#2B9C5D}.main_keyword{text-decoration:none;font-weight:700;color:brown}.main_escape{text-decoration:none;color:#6a5acd}.xml_cdata{text-decoration:none;font-weight:400;color:#a020f0}.xml_escape{text-decoration:none;font-weight:400;color:#a020f0}.xml_element{text-decoration:none;font-weight:400;color:#008a8c}.xml_attribute{text-decoration:none;font-weight:700;color:#6a5acd}.xml_attribute_value{text-decoration:none;font-weight:400;color:#f0f}.xml_comment{text-decoration:none;font-weight:400;color:#0202ff}.main_source .main_literal{text-decoration:none;color:#2ba199}.main_comment{text-decoration:none;color:#888a85}.main_preprocessor{text-decoration:none;color:#ad7fa8}div.main_code_definition{background-color:#eee;border-radius:6px;font-family:"Roboto Mono",monospace;margin:12px;padding:12px}div.main_notification_block{padding-right:10px;padding-left:10px;padding-bottom:5px;padding-top:5px;border-color:#d08717;background-color:#fbf2c3;border-style:solid;border-width:1px;margin:10px}span.main_block_headline{background-image:url(img/tip.svg);background-repeat:no-repeat;background-position:center right;font-weight:700;display:block}div.main_block_content{margin-left:15px}span.leaf_code_definition{font-family:"Roboto Mono",monospace;font-size:15px;font-weight:200}div.leaf_brief_description{display:block;margin-left:40px}h1.main_title{font-size:20px;margin-bottom:0}h2.main_title{margin-bottom:0}h3.main_title{margin-bottom:0}.main_hr{border:0;color:#b4a0c1;background-color:#b4a0c1;height:1px;margin-top:6px;margin-bottom:6px}.main_parameter_table_unknown_parameter{color:GREY}.main_parameter_table_name,.main_errordomain_table_name,.main_enum_table_name{vertical-align:top;text-align:right;font-weight:700;width:120px;padding-right:10px}.main_parameter_table,.main_errordomain_table,.main_enum_table{margin-weight:20px;margin-left:20px}.description a.constant,.brief_description a.constant{background-image:url(img/constant.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.namespace,.brief_description a.namespace{background-image:url(img/namespace.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.struct,.brief_description a.struct{background-image:url(img/struct.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.interface,.brief_description a.interface{background-image:url(img/interface.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.enum,.brief_description a.enum{background-image:url(img/enum.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.errordomain,.brief_description a.errordomain{background-image:url(img/errordomain.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.delegate,.brief_description a.delegate{background-image:url(img/delegate.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.signal,.brief_description a.signal{background-image:url(img/signal.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.field,.brief_description a.field{background-image:url(img/field.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.enumvalue,.brief_description a.enumvalue{background-image:url(img/enumvalue.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.errorcode,.brief_description a.errorcode{background-image:url(errorcode.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.class,.brief_description a.class{background-image:url(img/class.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}a.abstract_class,.description a.abstract_class,.brief_description a.abstract_class{background-image:url(img/abstractclass.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0;font-style:italic}.description a.property,.brief_description a.property{background-image:url(img/property.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.virtual_property,.brief_description a.virtual_property{background-image:url(img/virtualproperty.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.abstract_property,.brief_description a.abstract_property{background-image:url(img/abstractproperty.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.method,.brief_description a.method{background-image:url(img/method.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.static_method,.brief_description a.static_method{background-image:url(img/staticmethod.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}a.virtual_method,.description a.virtual_method,.brief_description a.virtual_method{background-image:url(img/virtualmethod.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.abstract_method,.brief_description a.abstract_method{background-image:url(img/abstractmethod.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.description a.creation_method,.brief_description a.creation_method{background-image:url(img/constructor.svg);display:inline-block;padding-right:17px;background-repeat:no-repeat;background-position:center right;border:0}.navi_main li,.navi_inline li{background-image:url(img/method.svg);background-repeat:no-repeat!important;background-position:left center!important;background-color:transparent;vertical-align:middle;list-style-type:none;margin:0;padding:0 0 0 20px;transition:all 0.5s ease-out}.navi_inline li{background-position:left 12px!important;padding:10px 0 10px 20px}.navi_main li.errorcode,.navi_inline li.errorcode{background-image:url(img/errorcode.svg)}.navi_main li.enumvalue,.navi_inline li.enumvalue{background-image:url(img/enumvalue.svg)}.navi_main li.abstract_class,.navi_inline li.abstract_class{background-image:url(img/abstractclass.svg)}.navi_main li.abstract_method,.navi_inline li.abstract_method{background-image:url(img/abstractmethod.svg)}.navi_main li.creation_method,.navi_inline li.creation_method,.main_list_m{background-image:url(img/constructor.svg)}.navi_main li.static_method,.navi_inline li.static_method{background-image:url(img/staticmethod.svg)}.navi_main li.package_index{background-image:url(img/packages.svg)}.navi_main li.virtual_method,.navi_inline li.virtual_method{background-image:url(img/virtualmethod.svg)}.navi_main li.errordomain,.navi_inline li.errordomain,.main_list_errdom{background-image:url(img/errordomain.svg)}.navi_main li.namespace,.navi_inline li.namespace,.main_list_ns{background-image:url(img/namespace.svg)}.navi_main li.method,.navi_inline li.method{background-image:url(img/method.svg)}.navi_main li.struct,.navi_inline li.struct,.main_list_stru{background-image:url(img/struct.svg)}.navi_main li.interface,.navi_inline li.interface,.main_list_iface{background-image:url(img/interface.svg)}.navi_main li.field,.navi_inline li.field,.main_list_field{background-image:url(img/field.svg)}.navi_main li.class,.navi_inline li.class,.main_list_cl{background-image:url(img/class.svg)}.navi_main li.enum,.navi_inline li.enum,.main_list_en{background-image:url(img/enum.svg)}.navi_main li.property,.navi_inline li.property,.main_list_prop{background-image:url(img/property.svg)}.navi_main li.abstract_property,.navi_inline li.abstract_property{background-image:url(img/abstractproperty.svg)}.navi_main li.virtual_property,.navi_inline li.virtual_property{background-image:url(img/virtualproperty.svg)}.navi_main li.delegate,.navi_inline li.delegate,.main_list_del{background-image:url(img/delegate.svg)}.navi_main li.signal,.navi_inline li.signal,.main_list_sig{background-image:url(img/signal.svg)}.navi_main li.package,.navi_inline li.package{background-image:url(img/package.svg)}.navi_main li.constant,.navi_inline li.constant{background-image:url(img/constant.svg)}.navi_main{margin-top:10px;margin-bottom:10px;padding-left:5px}.navi_main:last-child{padding-left:5px}.navi_hr{background-color:#dedede;border:0;border-top-width:0;border-bottom-width:0;border-top-style:none;border-bottom-style:none;border-top-color:currentcolor;border-bottom-color:currentcolor;border-bottom:1px solid #fff;border-top:1px solid #dedede;height:0;margin:6px 0}.navi_main a{text-decoration:none;color:#887E9C;line-height:26px;width:100%;display:inline-block;padding-left:0}a,.navi_inline a,a.external_link{text-decoration:none;color:#50A3BE;transition:all 0.5s ease-out}.navi_main li:hover{background-color:rgba(0,0,0,.1)}div.site_content .navi_main li:hover{background-color:transparent}a:hover,.navi_inline a:hover,a.external_link:hover,div.site_content .navi_main li a:hover{text-decoration:underline;color:#6A6576}.navi_main li:hover a{text-decoration:none}.navi_main .abstract_class>a,.navi_inline .abstract_class>a{font-style:italic}a.navi_link:hover,a.external_link:hover{text-decoration:underline}ul.no_bullet li{list-style-type:none}.navi_inline{}.css_content_literal{font-family:monospace;color:#ff01ff}code{font-family:monospace}.main_code_definition a,.leaf_code_definition a{text-decoration:none;color:inherit}.main_code_definition a:hover,.leaf_code_definition a:hover{text-decoration:underline}.box .headline{background-image:url(img/coll_open.svg);background-position:calc(100% - 1px) center;background-repeat:no-repeat;background-color:#eef;border-color:#aaf;border-style:solid;border-width:1px;margin:auto;width:90%;margin-top:20px;font-weight:700}.box .content{border-color:#aaf;border-width:0 1 1 1;border-style:solid;overflow:auto;display:none;margin:auto;width:90%}.box .column{float:left;width:33%}.package_note{}.deprecated{text-decoration:line-through} diff --git a/src/install.vala b/src/install.vala index 32fb290..d19912f 100644 --- a/src/install.vala +++ b/src/install.vala @@ -27,8 +27,38 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/ +/** + * root namespace of various Pluie lib + */ namespace Pluie { + /** + * Pluie.Io is dedicated to various input/ouput operations + */ + namespace Io + { + + } + + /** + * Samples namespace to illustrate or test functionnalities + */ + namespace Samples + { + + } + + /** + * Pluie.Yaml provides various tools to deal with yaml files and yaml nodes : + * + * Use {@link Yaml.Config} to load a .yml file and build a {@link Yaml.Root} node<
> + * Use {@link Yaml.Config.get} to retriew a particular {@link Yaml.Node}<
> + * Use {@link Yaml.Builder} to convert a {@link Yaml.Node} into a {@link Yaml.Object}<
> + * Use {@link Yaml.Dumper} to dump a {@link Yaml.Object} or {@link Yaml.Node} into a yaml string<
> + * Use {@link Yaml.serialize} to serialize a {@link Yaml.Object} or {@link Yaml.Node} into a string<
> + * Use {@link Yaml.deserialize} to deserialize a serialized string into a {@link Yaml.Node}<
> + * Use {@link Yaml.Collection} and {@link Yaml.AbstractChild} methods for Node traversing + */ namespace Yaml { protected const string INSTALL_PATH = "@INSTALL_PATH@"; diff --git a/src/vala/Pluie/Io.InputChunkStream.vala b/src/vala/Pluie/Io.InputChunkStream.vala index cde6c74..284b302 100644 --- a/src/vala/Pluie/Io.InputChunkStream.vala +++ b/src/vala/Pluie/Io.InputChunkStream.vala @@ -34,10 +34,25 @@ using GLib; */ class Pluie.Io.InputChunkStream : Object { + /** + * + */ protected ulong chunk_index; + /** + * + */ protected uint8 chunk_size; + /** + * + */ protected uint8 buffer_size; + /** + * + */ protected uint8[] buffer; + /** + * + */ protected FileStream fs; /** diff --git a/src/vala/Pluie/Samples.YamlChild.vala b/src/vala/Pluie/Samples.YamlChild.vala index e90cdda..7c8bac7 100644 --- a/src/vala/Pluie/Samples.YamlChild.vala +++ b/src/vala/Pluie/Samples.YamlChild.vala @@ -28,7 +28,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/ /** - * a test class to implements yamlize + * a YamlCHild test class */ public class Pluie.Samples.YamlChild : Yaml.Object { diff --git a/src/vala/Pluie/Samples.YamlObject.vala b/src/vala/Pluie/Samples.YamlObject.vala index 1bc5666..7ad8ce1 100644 --- a/src/vala/Pluie/Samples.YamlObject.vala +++ b/src/vala/Pluie/Samples.YamlObject.vala @@ -32,7 +32,7 @@ using Gee; using Pluie; /** - * a test class to implements yamlize + * a YamlObject test class */ public class Pluie.Samples.YamlObject : Yaml.Object { diff --git a/src/vala/Pluie/Samples.YamlStruct.vala b/src/vala/Pluie/Samples.YamlStruct.vala index 05cb8ce..8ea64a3 100644 --- a/src/vala/Pluie/Samples.YamlStruct.vala +++ b/src/vala/Pluie/Samples.YamlStruct.vala @@ -28,7 +28,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/ /** - * + * YamlStruct test structure */ public struct Pluie.Samples.YamlStruct { @@ -46,7 +46,8 @@ public struct Pluie.Samples.YamlStruct public uint blue; /** - * + * get a new YamlStruct populated by specified node + * @param node the source Yaml.Node */ public static YamlStruct from_yaml_node (Yaml.Node node) { diff --git a/src/vala/Pluie/Yaml.Config.vala b/src/vala/Pluie/Yaml.Config.vala index 4c7a382..0a21241 100644 --- a/src/vala/Pluie/Yaml.Config.vala +++ b/src/vala/Pluie/Yaml.Config.vala @@ -28,7 +28,44 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/ /** - * Yaml.Config class to manage Yaml configuration files + * Yaml.Config class to manage Yaml configuration files and provide a Yaml.Root node. + * + * Yaml.Config use a Yaml.Finder to easily retriew a particular node. <
> + * The Yaml.Config.get method is bind to the Yaml.Finder.find method with <
> + * the root node as context. (more details on {@link Yaml.Finder}) + * + * {{{ + * var config = new Yaml.Config (path); + * var node = config.get ("ship-to.address.city{0}"); + * if (node != null) { + * of.echo (node.data) + * } + * }}} + * + * You can use a special import clause to embed a set of yaml files into your current document. + * + * {{{ + * # | use special key word '^imports' to import other yaml config files in + * # | current yaml document + * # | '^imports' must be uniq and a direct child of root node + * # | imported files are injected as mapping nodes at top document level + * # | so you cannot use keys that already exists in the document + * ^imports : + * # you can redefine default import path with the special key '^path' + * # if you do not use it, the default path value will be the current directory + * # redefined path values are relative to the current directory (if a relative path + * # is provided) + * ^path : ./config + * # you can also define any other var by prefixing key with ^ + * ^dir : subdir + * # and use it enclosed by ^ + * # here final test path will be "./config/subdir/test.yml" + * test : ^dir^/test.yml + * # here final db path will be "./config/db.yml" + * db : db.yml + * }}} + * + * {{doc/img/pluie-yaml-imports2.png}} */ public class Pluie.Yaml.Config { diff --git a/src/vala/Pluie/Yaml.Finder.vala b/src/vala/Pluie/Yaml.Finder.vala index c2f3ef6..e43ad81 100644 --- a/src/vala/Pluie/Yaml.Finder.vala +++ b/src/vala/Pluie/Yaml.Finder.vala @@ -33,6 +33,19 @@ using Pluie; /** * Finder class used to easily retriew Yaml.Node + * + * Path definition has two mode : + * default mode is ''Yaml.FIND_MODE.DOT'' + * + * * child mapping node are separated by dot : + * * sequence entry must be enclosed in curly brace + * ex : ``grandfather.father.son{2}.age`` + * + * other mode is ''Yaml.FIND_MODE.SQUARE_BRACKETS''. + * + * * node's key name must be enclosed in square brackets + * * sequence entry must be enclosed in curly brace + * ex : ``[grandfather][father][son]{2}[age]`` */ public class Pluie.Yaml.Finder : GLib.Object { @@ -52,17 +65,7 @@ public class Pluie.Yaml.Finder : GLib.Object } /** - * find a specific child Yaml.Node corresponding to path definition - * path definition has two mode. - * default mode is Yaml.FIND_MODE.DOT - * - child mapping node are separated by dot : - * - sequence entry must be enclosed in curly brace - * ex : grandfather.father.son{2}.age - * - * other mode is Yaml.FIND_MODE.DOTSQUARE_BRACKETS - * - node's key name must be enclosed in square brackets - * - sequence entry must be enclosed in curly brace - * ex : [grandfather][father][son]{2}[age] + * Find a specific child Yaml.Node corresponding to path definition. * * @param path the definition to retriew the child node * @param context the Yaml.Node context to operate diff --git a/src/vala/Pluie/Yaml.GeeBuilder.vala b/src/vala/Pluie/Yaml.GeeBuilder.vala index 1b1ede5..629b281 100644 --- a/src/vala/Pluie/Yaml.GeeBuilder.vala +++ b/src/vala/Pluie/Yaml.GeeBuilder.vala @@ -38,7 +38,6 @@ public class Pluie.Yaml.GeeBuilder { /** * transform a Gee.Collection with fundamental type to a Yaml.Node - * @param Gee.ArrayList* a pointer to the list * @param property_name name of related property * @param parent parent Yaml.Node of the list * @param is_char flag indicating data with char representation diff --git a/src/vala/Pluie/Yaml.global.vala b/src/vala/Pluie/Yaml.global.vala index 687b5cb..55f9a10 100644 --- a/src/vala/Pluie/Yaml.global.vala +++ b/src/vala/Pluie/Yaml.global.vala @@ -27,419 +27,416 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *^*/ -namespace Pluie +namespace Pluie.Yaml { - namespace Yaml + const string YAML_VERSION = "1.2"; + const string YAML_VALA_PREFIX = "v"; + const string YAML_VALA_DIRECTIVE = "tag:pluie.org,2018:vala/"; + + public static bool DEBUG = false; + + public static bool DBG_SHOW_INDENT = true; + public static bool DBG_SHOW_PARENT = false; + public static bool DBG_SHOW_UUID = true; + public static bool DBG_SHOW_LEVEL = false; + public static bool DBG_SHOW_REF = false; + public static bool DBG_SHOW_COUNT = true; + public static bool DBG_SHOW_TAG = true; + public static bool DBG_SHOW_TYPE = true; + + /** + * + */ + internal static void dbg_action (string msg, string? val = null) { - const string YAML_VERSION = "1.2"; - const string YAML_VALA_PREFIX = "v"; - const string YAML_VALA_DIRECTIVE = "tag:pluie.org,2018:vala/"; + if (Pluie.Yaml.DEBUG) of.action (msg, val); + } - public static bool DEBUG = false; + /** + * + */ + internal static void dbg_keyval (string key, string val) + { + if (Pluie.Yaml.DEBUG) of.keyval (key, val); + } - public static bool DBG_SHOW_INDENT = true; - public static bool DBG_SHOW_PARENT = false; - public static bool DBG_SHOW_UUID = true; - public static bool DBG_SHOW_LEVEL = false; - public static bool DBG_SHOW_REF = false; - public static bool DBG_SHOW_COUNT = true; - public static bool DBG_SHOW_TAG = true; - public static bool DBG_SHOW_TYPE = true; + /** + * + */ + internal static void dbg_state (bool done) + { + if (Pluie.Yaml.DEBUG) of.state (done); + } - /** - * - */ - public static void dbg_action (string msg, string? val = null) - { - if (Pluie.Yaml.DEBUG) of.action (msg, val); - } + /** + * + */ + internal static void dbg (string? msg = null) + { + if (Pluie.Yaml.DEBUG && msg != null) of.echo (msg); + } - /** - * - */ - public static void dbg_keyval (string key, string val) - { - if (Pluie.Yaml.DEBUG) of.keyval (key, val); - } + /** + * ParseError + */ + public errordomain AddNodeError + { + MAPPING_CONTAINS_CHILD, + MAPPING_IS_SINGLE_PAIR, + MAPPING_NOT_SINGLE_PAIR + } - /** - * - */ - public static void dbg_state (bool done) - { - if (Pluie.Yaml.DEBUG) of.state (done); - } + private const ZlibCompressorFormat ZFORMAT = ZlibCompressorFormat.GZIP; - /** - * - */ - public static void dbg (string? msg = null) - { - if (Pluie.Yaml.DEBUG && msg != null) of.echo (msg); - } + /** + * + */ + private void convert (File source, File dest, Converter converter) throws Error { + var src_stream = source.read (); + var dst_stream = dest.replace (null, false, 0); + var conv_stream = new ConverterOutputStream (dst_stream, converter); + // 'splice' pumps all data from an InputStream to an OutputStream + conv_stream.splice (src_stream, 0); + } - /** - * ParseError - */ - public errordomain AddNodeError - { - MAPPING_CONTAINS_CHILD, - MAPPING_IS_SINGLE_PAIR, - MAPPING_NOT_SINGLE_PAIR - } - - private const ZlibCompressorFormat ZFORMAT = ZlibCompressorFormat.GZIP; - - /** - * - */ - private void convert (File source, File dest, Converter converter) throws Error { - var src_stream = source.read (); - var dst_stream = dest.replace (null, false, 0); - var conv_stream = new ConverterOutputStream (dst_stream, converter); - // 'splice' pumps all data from an InputStream to an OutputStream - conv_stream.splice (src_stream, 0); - } - - /** - * - */ - public static uint8[] serialize (GLib.Object? obj, string? dest = null) - { - Array a = new Array (); - if (obj != null) { - var node = obj.get_type ().is_a (typeof (Yaml.Node)) ? obj as Yaml.Node : Yaml.Builder.to_node (obj); - if (node != null) { - var content = node.to_yaml_string (); - var date = new GLib.DateTime.now_local ().format ("%s"); - var path = Path.build_filename (Environment.get_tmp_dir (), "pluie-yaml-%s-%s.source".printf (date, node.uuid)); - var dpath = dest == null ? path + ".gz" : dest; - var writter = new Io.Writter (path); - if (writter.write (content.data)) { - try { - var gzfile = File.new_for_path (dpath); - convert (writter.file, gzfile, new ZlibCompressor (ZFORMAT)); - var reader = new Io.InputChunkStream(dpath, 80); - while (!reader.eof ()) { - var b = reader.read (); - a.append_vals (b, reader.get_buffer_size ()); - } - writter.delete_file (); - if (dest == null) { - writter.delete_file (gzfile); - } - } - catch (GLib.Error e) { - of.error (e.message); - } - } - } - } - return a.data; - } - - /** - * - */ - public static Yaml.Root deserialize (uint8[] zdata) - { - Yaml.Root? obj = null; - if (zdata.length > 0) { + /** + * + */ + public static uint8[] serialize (GLib.Object? obj, string? dest = null) + { + Array a = new Array (); + if (obj != null) { + var node = obj.get_type ().is_a (typeof (Yaml.Node)) ? obj as Yaml.Node : Yaml.Builder.to_node (obj); + if (node != null) { + var content = node.to_yaml_string (); var date = new GLib.DateTime.now_local ().format ("%s"); - var path = Path.build_filename (Environment.get_tmp_dir (), "pluie-yaml-%s.gz".printf (date)); - var dpath = Path.build_filename (Environment.get_tmp_dir (), "pluie-yaml-%s.source".printf (date)); + var path = Path.build_filename (Environment.get_tmp_dir (), "pluie-yaml-%s-%s.source".printf (date, node.uuid)); + var dpath = dest == null ? path + ".gz" : dest; var writter = new Io.Writter (path); - if (writter.write (zdata)) { - var file = File.new_for_path (dpath); + if (writter.write (content.data)) { try { - convert (writter.file, file, new ZlibDecompressor (ZFORMAT)); - var config = new Yaml.Config (dpath); - obj = config.root_node (); + var gzfile = File.new_for_path (dpath); + convert (writter.file, gzfile, new ZlibCompressor (ZFORMAT)); + var reader = new Io.InputChunkStream(dpath, 80); + while (!reader.eof ()) { + var b = reader.read (); + a.append_vals (b, reader.get_buffer_size ()); + } writter.delete_file (); + if (dest == null) { + writter.delete_file (gzfile); + } } - catch(GLib.Error e) { + catch (GLib.Error e) { of.error (e.message); } } } - return obj; } + return a.data; + } + + /** + * + */ + public static Yaml.Root deserialize (uint8[] zdata) + { + Yaml.Root? obj = null; + if (zdata.length > 0) { + var date = new GLib.DateTime.now_local ().format ("%s"); + var path = Path.build_filename (Environment.get_tmp_dir (), "pluie-yaml-%s.gz".printf (date)); + var dpath = Path.build_filename (Environment.get_tmp_dir (), "pluie-yaml-%s.source".printf (date)); + var writter = new Io.Writter (path); + if (writter.write (zdata)) { + var file = File.new_for_path (dpath); + try { + convert (writter.file, file, new ZlibDecompressor (ZFORMAT)); + var config = new Yaml.Config (dpath); + obj = config.root_node (); + writter.delete_file (); + } + catch(GLib.Error e) { + of.error (e.message); + } + } + } + return obj; + } + + /** + * haxadecimal sequence + */ + const string hexa_sequence = "0123456789abcdef"; + + /** + * convert %02x string to uint8 + * @param hex2byte string representation of hexadecimal value on 1 byte + */ + uint8 hex_to_dec (string hexbyte) + { + return (uint8) ( + Yaml.hexa_sequence.index_of(hexbyte.data[0].to_string ())*16 + + Yaml.hexa_sequence.index_of(hexbyte.data[1].to_string ()) + ); + } + + /** + * enum MatchInfo keys of Yaml.Mode.find method related to mode FIND_MODE.SQUARE_BRACKETS of Yaml.Node + */ + public enum EVT { + NONE, + STREAM_START, + STREAM_END, + VERSION_DIRECTIVE, + TAG_DIRECTIVE, + DOCUMENT_START, + DOCUMENT_END, + BLOCK_SEQUENCE_START, + BLOCK_MAPPING_START, + BLOCK_END, + FLOW_SEQUENCE_START, + FLOW_SEQUENCE_END, + FLOW_MAPPING_START, + FLOW_MAPPING_END, + BLOCK_ENTRY, + FLOW_ENTRY, + KEY, + VALUE, + ALIAS, + ANCHOR, + TAG, + SCALAR; /** - * haxadecimal sequence - */ - const string hexa_sequence = "0123456789abcdef"; - - /** - * convert %02x string to uint8 - * @param hex2byte string representation of hexadecimal value on 1 byte - */ - uint8 hex_to_dec (string hexbyte) + * @return infos related to EVT + */ + public string infos () { - return (uint8) ( - Yaml.hexa_sequence.index_of(hexbyte.data[0].to_string ())*16 + - Yaml.hexa_sequence.index_of(hexbyte.data[1].to_string ()) - ); + return this.to_string().substring("PLUIE_YAML_".length); } /** - * enum MatchInfo keys of Yaml.Mode.find method related to mode FIND_MODE.SQUARE_BRACKETS of Yaml.Node - */ - public enum EVT { - NONE, - STREAM_START, - STREAM_END, - VERSION_DIRECTIVE, - TAG_DIRECTIVE, - DOCUMENT_START, - DOCUMENT_END, - BLOCK_SEQUENCE_START, - BLOCK_MAPPING_START, - BLOCK_END, - FLOW_SEQUENCE_START, - FLOW_SEQUENCE_END, - FLOW_MAPPING_START, - FLOW_MAPPING_END, - BLOCK_ENTRY, - FLOW_ENTRY, - KEY, - VALUE, - ALIAS, - ANCHOR, - TAG, - SCALAR; - - /** - * @return infos related to EVT - */ - public string infos () - { - return this.to_string().substring("PLUIE_YAML_".length); - } - - /** - * @return event is key - */ - public bool is_key () - { - return this == EVT.KEY; - } - - /** - * @return event is anchor - */ - public bool is_anchor () - { - return this == EVT.ANCHOR; - } - - /** - * @return event is alias - */ - public bool is_alias () - { - return this == EVT.ALIAS; - } - - /** - * @return event is tag - */ - public bool is_tag () - { - return this == EVT.TAG; - } - - /** - * @return event is tag - */ - public bool is_tag_directive () - { - return this == EVT.TAG_DIRECTIVE; - } - - /** - * @return event is key - */ - public bool is_value () - { - return this == EVT.VALUE; - } - - /** - * @return event is scalar - */ - public bool is_scalar () - { - return this == EVT.SCALAR; - } - - /** - * @return event is mapping start event - */ - public bool is_mapping_start () - { - return this == EVT.BLOCK_MAPPING_START || this == EVT.FLOW_MAPPING_START; - } - - /** - * @return event is sequence start event - */ - public bool is_sequence_start () - { - return this == EVT.BLOCK_SEQUENCE_START || this == EVT.FLOW_SEQUENCE_START; - } - - /** - * @return event is sequence end event - */ - public bool is_sequence_end () - { - return this == EVT.BLOCK_END || this == EVT.FLOW_SEQUENCE_END; - } - - /** - * @return event is sequence entry event - */ - public bool is_entry () - { - return this == EVT.BLOCK_ENTRY || this == EVT.FLOW_ENTRY; - } - - /** - * @return event is mapping end event - */ - public bool is_mapping_end () - { - return this == EVT.BLOCK_END; - } - - /** - * @return event is error event - */ - public bool is_error () - { - return this == EVT.NONE; - } - - } - - /** - * enum possible find mode of Yaml.Node.mode - */ - public enum FIND_MODE + * @return event is key + */ + public bool is_key () { - DOT, - SQUARE_BRACKETS; - - /** - * - */ - public bool is_dot () - { - return this == DOT; - } - } - - public static FIND_MODE MODE = FIND_MODE.DOT; - - /** - * enum MatchInfo keys of Yaml.Mode.find method related to mode FIND_MODE.SQUARE_BRACKETS of Yaml.Node - */ - internal enum FIND_COLLECTION { PATH, OPEN, KEY, CLOSE; } - - /** - * enum MatchInfo keys of Yaml.Node.find method related to mode FIND_MODE.DOT of Yaml.Node - */ - internal enum FIND_DOT { PATH, KEY, SEQUENCE; } - - /** - * enum possible type of Yaml.Node - */ - public enum NODE_TYPE - { - UNDEFINED, - ROOT, - SCALAR, - SINGLE_PAIR, - MAPPING, - SEQUENCE; - - /** - * @return if current NODE_TYPE match a collection node (root|mapping|sequence) - */ - public bool is_collection () - { - return this == MAPPING || this == SEQUENCE || this == ROOT; - } - - /** - * @return if current NODE_TYPE match a scalar node - */ - public bool is_scalar () - { - return this == SCALAR; - } - - /** - * @return if current NODE_TYPE match a single/pair mapping node - */ - public bool is_single_pair () - { - return this == SINGLE_PAIR; - } - - /** - * @return if current NODE_TYPE match a mapping node - */ - public bool is_mapping () - { - return this == MAPPING; - } - - /** - * @return if current NODE_TYPE match a sequence node - */ - public bool is_sequence () - { - return this == SEQUENCE; - } - - /** - * @return if current NODE_TYPE match a root node - */ - public bool is_root () - { - return this == ROOT; - } - - /** - *@return infos related to NODE_TYPE - */ - public string infos () - { - return this.to_string().substring("PLUIE_YAML_NODE_TYPE_".length); - } + return this == EVT.KEY; } /** - *@return universal infos related to NODE_TYPE - */ - public string uuid () + * @return event is anchor + */ + public bool is_anchor () { - var sb = new StringBuilder(); - for (var i = 0; i < 4; i++) sb.append (Random.next_int ().to_string ("%08x")); - var h = sb.str; - var d = Yaml.hex_to_dec (h.substring (16, 2)); - d &= 0x3f; - d |= 0x80; - return "%s-%s-4%s-%02x%s-%s".printf ( - h.substring (0, 8), - h.substring (8, 4), - h.substring (13, 3), - d, - h.substring (18, 2), - h.substring (20) - ); + return this == EVT.ANCHOR; + } + + /** + * @return event is alias + */ + public bool is_alias () + { + return this == EVT.ALIAS; + } + + /** + * @return event is tag + */ + public bool is_tag () + { + return this == EVT.TAG; + } + + /** + * @return event is tag + */ + public bool is_tag_directive () + { + return this == EVT.TAG_DIRECTIVE; + } + + /** + * @return event is key + */ + public bool is_value () + { + return this == EVT.VALUE; + } + + /** + * @return event is scalar + */ + public bool is_scalar () + { + return this == EVT.SCALAR; + } + + /** + * @return event is mapping start event + */ + public bool is_mapping_start () + { + return this == EVT.BLOCK_MAPPING_START || this == EVT.FLOW_MAPPING_START; + } + + /** + * @return event is sequence start event + */ + public bool is_sequence_start () + { + return this == EVT.BLOCK_SEQUENCE_START || this == EVT.FLOW_SEQUENCE_START; + } + + /** + * @return event is sequence end event + */ + public bool is_sequence_end () + { + return this == EVT.BLOCK_END || this == EVT.FLOW_SEQUENCE_END; + } + + /** + * @return event is sequence entry event + */ + public bool is_entry () + { + return this == EVT.BLOCK_ENTRY || this == EVT.FLOW_ENTRY; + } + + /** + * @return event is mapping end event + */ + public bool is_mapping_end () + { + return this == EVT.BLOCK_END; + } + + /** + * @return event is error event + */ + public bool is_error () + { + return this == EVT.NONE; + } + + } + + /** + * enum possible find mode of Yaml.Node.mode + */ + public enum FIND_MODE + { + DOT, + SQUARE_BRACKETS; + + /** + * + */ + public bool is_dot () + { + return this == DOT; } } + + public static FIND_MODE MODE = FIND_MODE.DOT; + + /** + * enum MatchInfo keys of Yaml.Mode.find method related to mode FIND_MODE.SQUARE_BRACKETS of Yaml.Node + */ + internal enum FIND_COLLECTION { PATH, OPEN, KEY, CLOSE; } + + /** + * enum MatchInfo keys of Yaml.Node.find method related to mode FIND_MODE.DOT of Yaml.Node + */ + internal enum FIND_DOT { PATH, KEY, SEQUENCE; } + + /** + * enum possible type of Yaml.Node + */ + public enum NODE_TYPE + { + UNDEFINED, + ROOT, + SCALAR, + SINGLE_PAIR, + MAPPING, + SEQUENCE; + + /** + * @return if current NODE_TYPE match a collection node (root|mapping|sequence) + */ + public bool is_collection () + { + return this == MAPPING || this == SEQUENCE || this == ROOT; + } + + /** + * @return if current NODE_TYPE match a scalar node + */ + public bool is_scalar () + { + return this == SCALAR; + } + + /** + * @return if current NODE_TYPE match a single/pair mapping node + */ + public bool is_single_pair () + { + return this == SINGLE_PAIR; + } + + /** + * @return if current NODE_TYPE match a mapping node + */ + public bool is_mapping () + { + return this == MAPPING; + } + + /** + * @return if current NODE_TYPE match a sequence node + */ + public bool is_sequence () + { + return this == SEQUENCE; + } + + /** + * @return if current NODE_TYPE match a root node + */ + public bool is_root () + { + return this == ROOT; + } + + /** + *@return infos related to NODE_TYPE + */ + public string infos () + { + return this.to_string().substring("PLUIE_YAML_NODE_TYPE_".length); + } + } + + /** + *@return universal infos related to NODE_TYPE + */ + public string uuid () + { + var sb = new StringBuilder(); + for (var i = 0; i < 4; i++) sb.append (Random.next_int ().to_string ("%08x")); + var h = sb.str; + var d = Yaml.hex_to_dec (h.substring (16, 2)); + d &= 0x3f; + d |= 0x80; + return "%s-%s-4%s-%02x%s-%s".printf ( + h.substring (0, 8), + h.substring (8, 4), + h.substring (13, 3), + d, + h.substring (18, 2), + h.substring (20) + ); + } } diff --git a/valadoc.sh b/valadoc.sh index aaee529..a4e3c52 100755 --- a/valadoc.sh +++ b/valadoc.sh @@ -31,11 +31,11 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 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 - rm $lib.tar.gz - tar -czvf $lib.tar.gz doc/ + #~ rm $lib.tar.gz + #~ tar -czvf $lib.tar.gz doc/ fi