Contains private implementation details of the k3d::xml API. More...
Classes | |
| class | save_dependencies |
| class | load_dependencies |
| struct | same_name |
| Helper functor for searching for shaders by name. More... | |
| class | save_typed_array |
| class | load_typed_array |
Functions | |
| void | upgrade_objects_element (element &XMLDocument) |
| Converts <objects> tags to <nodes> tags. | |
| void | upgrade_object_elements (element &XMLDocument) |
| Converts <object> tags to <node> tags. | |
| void | upgrade_class_properties (element &XMLDocument) |
| Converts "class" attributes to "factory" attributes. | |
| void | upgrade_variables_elements (element &XMLDocument) |
| Converts <variables> tags to <properties> tags. | |
| void | upgrade_property_object_elements (element &XMLDocument) |
| Converts <object> tags to <property> tags. | |
| void | upgrade_property_shader_elements (element &XMLDocument) |
| Converts <shader> tags to <property> tags. | |
| void | upgrade_property_variable_elements (element &XMLDocument) |
| Converts <variable> tags to <property> tags. | |
| void | upgrade_property_values (element &XMLDocument) |
| void | upgrade_user_property_types (element &XMLDocument) |
| void | upgrade_pipeline_element (element &XMLDocument) |
| Converts <pipeline> tags to <dependencies> tags. | |
| void | upgrade_from_object_attributes (element &XMLDocument) |
| Converts "from_object" attributes to "from_node" attributes. | |
| void | upgrade_to_object_attributes (element &XMLDocument) |
| Converts "to_object" attributes to "to_node" attributes. | |
| void | upgrade_l_system_parser_nodes (element &XMLDocument) |
| Upgrades LSystemParser nodes so their "orientation" property is set correctly. | |
| void | upgrade_poly_grid_nodes (element &XMLDocument) |
| Upgrades PolyGrid nodes so their "orientation" property is set correctly. | |
| void | upgrade_poly_terrain_fft_nodes (element &XMLDocument) |
| Upgrades PolyTerrainFFT nodes so their "orientation" property is set correctly. | |
| void | upgrade_poly_terrain_hfbm_nodes (element &XMLDocument) |
| Upgrades PolyTerrainHfBm nodes so their "orientation" property is set correctly. | |
| void | upgrade_poly_text_nodes (element &XMLDocument) |
| Upgrades PolyText nodes so their "orientation" property is set correctly. | |
| void | upgrade_poly_sphere_nodes (element &XMLDocument) |
| Upgrades PolySphere nodes so their "type" property is set correctly. | |
| const ipersistent_lookup::id_type | max_node_id (element &XMLDocument) |
| Returns the largest node id in use in the given document. | |
| void | adjust_dependencies (element &XMLDocument, const ipersistent_lookup::id_type FromID, const string_t &FromProperty, const ipersistent_lookup::id_type ToID, const string_t &ToProperty) |
| void | upgrade_transformable_nodes (element &XMLDocument) |
| Upgrades transformable nodes so that their position/orientation/scale properties are replaced with a Transform node. | |
| void | upgrade_painters (element &XMLDocument) |
| Add default painters if no painters are present. | |
| void | upgrade_node_selection (element &XMLDocument) |
| void | upgrade_delete_components_nodes (element &XMLDocument) |
| Inserts a SelectCompanion modifier before old Delete nodes. | |
| void | save_array_metadata (element &Storage, const array &Array, const ipersistent::save_context &Context) |
| template<typename array_type > | |
| void | save_array (element &Container, element Storage, const array_type &Array, const ipersistent::save_context &Context) |
| void | save_array (element &Container, element Storage, const typed_array< int8_t > &Array, const ipersistent::save_context &Context) |
| Specialization of save_array to ensure that 8-bit integers don't get serialized as characters. | |
| void | save_array (element &Container, element Storage, const typed_array< uint8_t > &Array, const ipersistent::save_context &Context) |
| Specialization of save_array to ensure that 8-bit unsigned integers don't get serialized as characters. | |
| void | save_array (element &Container, element Storage, const typed_array< string_t > &Array, const ipersistent::save_context &Context) |
| Specialization of save_array to handle whitespace in strings. | |
| void | save_array (element &Container, element Storage, const typed_array< double_t > &Array, const ipersistent::save_context &Context) |
| Specialization of save_array to ensure we don't lose precision when writing arrays of double. | |
| void | save_array (element &Container, element Storage, const typed_array< imaterial * > &Array, const ipersistent::save_context &Context) |
| template<typename array_type > | |
| void | save_array (element &Container, element Storage, const pipeline_data< array_type > &Array, const ipersistent::save_context &Context) |
| void | save_arrays (element &Container, element Storage, const mesh::named_arrays_t &Arrays, const ipersistent::save_context &Context) |
| void | save_arrays (element &Container, element Storage, const mesh::table_t &Arrays, const ipersistent::save_context &Context) |
| void | load_array_metadata (const element &Storage, array &Array, const ipersistent::load_context &Context) |
| template<typename array_type > | |
| void | load_array (const element &Storage, array_type &Array, const ipersistent::load_context &Context) |
| void | load_array (const element &Storage, typed_array< int8_t > &Array, const ipersistent::load_context &Context) |
| void | load_array (const element &Storage, typed_array< uint8_t > &Array, const ipersistent::load_context &Context) |
| void | load_array (const element &Storage, uint_t_array &Array, const ipersistent::load_context &Context) |
| void | load_array (const element &Storage, typed_array< string_t > &Array, const ipersistent::load_context &Context) |
| void | load_array (const element &Storage, typed_array< imaterial * > &Array, const ipersistent::load_context &Context) |
| void | load_array (const element &Storage, typed_array< inode * > &Array, const ipersistent::load_context &Context) |
| template<typename array_type > | |
| void | load_array (const element &Container, const string_t &Storage, pipeline_data< array_type > &Array, const ipersistent::load_context &Context) |
| template<typename array_type > | |
| void | load_array (const element &Container, const string_t &Storage, array_type &Array, const ipersistent::load_context &Context) |
| template<typename arrays_t > | |
| void | load_arrays (const element &Container, arrays_t &Arrays, const ipersistent::load_context &Context) |
| void | load_arrays (const element &Container, const string_t &Storage, mesh::named_arrays_t &Arrays, const ipersistent::load_context &Context) |
| void | load_arrays (const element &Container, const string_t &Storage, mesh::table_t &Table, const ipersistent::load_context &Context) |
| long & | single_line (std::ios &Stream) |
| Returns true iff the XML should be serialized on a single line, otherwise false. | |
| std::ostream & | eol (std::ostream &Stream) |
| Inserts a "virtual" line break into a stream, the actual output is controlled by the state of the single_line flag. | |
| std::ostream & | indentation (std::ostream &Stream) |
| Inserts whitespace into a stream, proportional to its indentation level (we override the default to implement single_line behavior). | |
| const std::string | trim (const std::string &String) |
| Returns the input string with leading and trailing whitespace removed. | |
| const std::string | encode (const std::string &String) |
| Returns the input string, with special characters encoded for XML. | |
Contains private implementation details of the k3d::xml API.
| void k3d::xml::detail::adjust_dependencies | ( | element & | XMLDocument, | |
| const ipersistent_lookup::id_type | FromID, | |||
| const string_t & | FromProperty, | |||
| const ipersistent_lookup::id_type | ToID, | |||
| const string_t & | ToProperty | |||
| ) |
References k3d::xml::find_attribute(), k3d::xml::find_element(), k3d::string_cast(), and k3d::xml::attribute::value.
Referenced by upgrade_transformable_nodes().
| const std::string k3d::xml::detail::encode | ( | const std::string & | String | ) |
Returns the input string, with special characters encoded for XML.
References modifier::result.
| std::ostream& k3d::xml::detail::eol | ( | std::ostream & | Stream | ) |
Inserts a "virtual" line break into a stream, the actual output is controlled by the state of the single_line flag.
References single_line().
| std::ostream& k3d::xml::detail::indentation | ( | std::ostream & | Stream | ) |
Inserts whitespace into a stream, proportional to its indentation level (we override the default to implement single_line behavior).
References k3d::current_indent(), and single_line().
| void k3d::xml::detail::load_array | ( | const element & | Container, | |
| const string_t & | Storage, | |||
| array_type & | Array, | |||
| const ipersistent::load_context & | Context | |||
| ) | [inline] |
References k3d::xml::find_element(), and load_array().
| void k3d::xml::detail::load_array | ( | const element & | Container, | |
| const string_t & | Storage, | |||
| pipeline_data< array_type > & | Array, | |||
| const ipersistent::load_context & | Context | |||
| ) | [inline] |
| void k3d::xml::detail::load_array | ( | const element & | Storage, | |
| typed_array< inode * > & | Array, | |||
| const ipersistent::load_context & | Context | |||
| ) |
| void k3d::xml::detail::load_array | ( | const element & | Storage, | |
| typed_array< imaterial * > & | Array, | |||
| const ipersistent::load_context & | Context | |||
| ) |
| void k3d::xml::detail::load_array | ( | const element & | Storage, | |
| typed_array< string_t > & | Array, | |||
| const ipersistent::load_context & | Context | |||
| ) |
References k3d::xml::element::children, and load_array_metadata().
| void k3d::xml::detail::load_array | ( | const element & | Storage, | |
| uint_t_array & | Array, | |||
| const ipersistent::load_context & | Context | |||
| ) |
References load_array_metadata(), k3d::xml::element::text, and generate::value.
| void k3d::xml::detail::load_array | ( | const element & | Storage, | |
| typed_array< uint8_t > & | Array, | |||
| const ipersistent::load_context & | Context | |||
| ) |
References load_array_metadata(), k3d::xml::element::text, and generate::value.
| void k3d::xml::detail::load_array | ( | const element & | Storage, | |
| typed_array< int8_t > & | Array, | |||
| const ipersistent::load_context & | Context | |||
| ) |
References load_array_metadata(), k3d::xml::element::text, and generate::value.
| void k3d::xml::detail::load_array | ( | const element & | Storage, | |
| array_type & | Array, | |||
| const ipersistent::load_context & | Context | |||
| ) | [inline] |
| void k3d::xml::detail::load_array_metadata | ( | const element & | Storage, | |
| array & | Array, | |||
| const ipersistent::load_context & | Context | |||
| ) |
References k3d::xml::attribute_text(), k3d::xml::element::children, k3d::xml::find_element(), and k3d::array::set_metadata_value().
Referenced by load_array().
| void k3d::xml::detail::load_arrays | ( | const element & | Container, | |
| const string_t & | Storage, | |||
| mesh::table_t & | Table, | |||
| const ipersistent::load_context & | Context | |||
| ) |
References k3d::xml::find_element().
| void k3d::xml::detail::load_arrays | ( | const element & | Container, | |
| const string_t & | Storage, | |||
| mesh::named_arrays_t & | Arrays, | |||
| const ipersistent::load_context & | Context | |||
| ) |
References k3d::xml::find_element().
| void k3d::xml::detail::load_arrays | ( | const element & | Container, | |
| arrays_t & | Arrays, | |||
| const ipersistent::load_context & | Context | |||
| ) | [inline] |
| const ipersistent_lookup::id_type k3d::xml::detail::max_node_id | ( | element & | XMLDocument | ) |
Returns the largest node id in use in the given document.
References k3d::xml::find_element(), and modifier::result.
Referenced by upgrade_delete_components_nodes(), upgrade_node_selection(), upgrade_painters(), and upgrade_transformable_nodes().
| void k3d::xml::detail::save_array | ( | element & | Container, | |
| element | Storage, | |||
| const pipeline_data< array_type > & | Array, | |||
| const ipersistent::save_context & | Context | |||
| ) | [inline] |
References save_array().
| void k3d::xml::detail::save_array | ( | element & | Container, | |
| element | Storage, | |||
| const typed_array< imaterial * > & | Array, | |||
| const ipersistent::save_context & | Context | |||
| ) |
| void k3d::xml::detail::save_array | ( | element & | Container, | |
| element | Storage, | |||
| const typed_array< double_t > & | Array, | |||
| const ipersistent::save_context & | Context | |||
| ) |
Specialization of save_array to ensure we don't lose precision when writing arrays of double.
References k3d::xml::element::append(), save_array_metadata(), and k3d::xml::element::text.
| void k3d::xml::detail::save_array | ( | element & | Container, | |
| element | Storage, | |||
| const typed_array< string_t > & | Array, | |||
| const ipersistent::save_context & | Context | |||
| ) |
Specialization of save_array to handle whitespace in strings.
References k3d::xml::element::append(), and save_array_metadata().
| void k3d::xml::detail::save_array | ( | element & | Container, | |
| element | Storage, | |||
| const typed_array< uint8_t > & | Array, | |||
| const ipersistent::save_context & | Context | |||
| ) |
Specialization of save_array to ensure that 8-bit unsigned integers don't get serialized as characters.
References k3d::xml::element::append(), save_array_metadata(), and k3d::xml::element::text.
| void k3d::xml::detail::save_array | ( | element & | Container, | |
| element | Storage, | |||
| const typed_array< int8_t > & | Array, | |||
| const ipersistent::save_context & | Context | |||
| ) |
Specialization of save_array to ensure that 8-bit integers don't get serialized as characters.
References k3d::xml::element::append(), save_array_metadata(), and k3d::xml::element::text.
| void k3d::xml::detail::save_array | ( | element & | Container, | |
| element | Storage, | |||
| const array_type & | Array, | |||
| const ipersistent::save_context & | Context | |||
| ) | [inline] |
| void k3d::xml::detail::save_array_metadata | ( | element & | Storage, | |
| const array & | Array, | |||
| const ipersistent::save_context & | Context | |||
| ) |
References k3d::xml::element::append(), k3d::array::get_metadata(), and vacuum::metadata.
Referenced by save_array().
| void k3d::xml::detail::save_arrays | ( | element & | Container, | |
| element | Storage, | |||
| const mesh::table_t & | Arrays, | |||
| const ipersistent::save_context & | Context | |||
| ) |
References k3d::xml::element::append(), k3d::demangle(), k3d::error(), k3d_file_reference, k3d::log(), and generate::name.
| void k3d::xml::detail::save_arrays | ( | element & | Container, | |
| element | Storage, | |||
| const mesh::named_arrays_t & | Arrays, | |||
| const ipersistent::save_context & | Context | |||
| ) |
References k3d::xml::element::append(), k3d::demangle(), k3d::error(), k3d_file_reference, k3d::log(), and generate::name.
| long& k3d::xml::detail::single_line | ( | std::ios & | Stream | ) |
Returns true iff the XML should be serialized on a single line, otherwise false.
References make-epydoc-docs::index.
Referenced by eol(), and indentation().
| const std::string k3d::xml::detail::trim | ( | const std::string & | String | ) |
Returns the input string with leading and trailing whitespace removed.
| void k3d::xml::detail::upgrade_class_properties | ( | element & | XMLDocument | ) |
Converts "class" attributes to "factory" attributes.
References k3d::xml::find_attribute(), k3d::log(), vacuum::match, k3d::xml::attribute::name, modifier::result, and k3d::warning().
| void k3d::xml::detail::upgrade_delete_components_nodes | ( | element & | XMLDocument | ) |
Inserts a SelectCompanion modifier before old Delete nodes.
References k3d::xml::element::children, k3d::python::factory_id(), k3d::xml::find_element(), k3d::plugin::factory::lookup(), max_node_id(), k3d::uuid::null(), k3d::xml::set_attribute(), and k3d::string_cast().
| void k3d::xml::detail::upgrade_from_object_attributes | ( | element & | XMLDocument | ) |
Converts "from_object" attributes to "from_node" attributes.
References k3d::xml::find_attribute(), k3d::log(), vacuum::match, k3d::xml::attribute::name, modifier::result, and k3d::warning().
| void k3d::xml::detail::upgrade_l_system_parser_nodes | ( | element & | XMLDocument | ) |
Upgrades LSystemParser nodes so their "orientation" property is set correctly.
References k3d::xml::element::append(), k3d::xml::attribute_text(), k3d::xml::element::children, k3d::xml::find_element(), k3d::log(), k3d::uuid::null(), and k3d::warning().
| void k3d::xml::detail::upgrade_node_selection | ( | element & | XMLDocument | ) |
References k3d::xml::element::children, k3d::python::factory_id(), k3d::xml::find_element(), k3d::material::lookup(), k3d::plugin::factory::lookup(), max_node_id(), module::ode::node_factory(), node_selection::node_selection, k3d::uuid::null(), k3d::xml::element::push_back(), return_if_fail, and k3d::string_cast().
| void k3d::xml::detail::upgrade_object_elements | ( | element & | XMLDocument | ) |
Converts <object> tags to <node> tags.
References k3d::log(), vacuum::match, modifier::result, and k3d::warning().
| void k3d::xml::detail::upgrade_objects_element | ( | element & | XMLDocument | ) |
Converts <objects> tags to <nodes> tags.
References k3d::log(), vacuum::match, modifier::result, and k3d::warning().
| void k3d::xml::detail::upgrade_painters | ( | element & | XMLDocument | ) |
Add default painters if no painters are present.
References k3d::xml::element::children, k3d::python::factory_id(), k3d::xml::find_element(), k3d::plugin::factory::lookup(), k3d::material::lookup(), max_node_id(), k3d::classes::MeshInstance(), module::ode::node_factory(), k3d::uuid::null(), k3d::xml::element::push_back(), return_if_fail, and k3d::string_cast().
| void k3d::xml::detail::upgrade_pipeline_element | ( | element & | XMLDocument | ) |
Converts <pipeline> tags to <dependencies> tags.
References k3d::log(), vacuum::match, modifier::result, and k3d::warning().
| void k3d::xml::detail::upgrade_poly_grid_nodes | ( | element & | XMLDocument | ) |
Upgrades PolyGrid nodes so their "orientation" property is set correctly.
References k3d::xml::element::append(), k3d::xml::attribute_text(), k3d::xml::element::children, k3d::xml::find_element(), k3d::log(), k3d::uuid::null(), and k3d::warning().
| void k3d::xml::detail::upgrade_poly_sphere_nodes | ( | element & | XMLDocument | ) |
Upgrades PolySphere nodes so their "type" property is set correctly.
References k3d::xml::element::append(), k3d::xml::attribute_text(), k3d::xml::element::children, k3d::xml::find_element(), k3d::log(), k3d::uuid::null(), and k3d::warning().
| void k3d::xml::detail::upgrade_poly_terrain_fft_nodes | ( | element & | XMLDocument | ) |
Upgrades PolyTerrainFFT nodes so their "orientation" property is set correctly.
References k3d::xml::element::append(), k3d::xml::attribute_text(), k3d::xml::element::children, k3d::xml::find_element(), k3d::log(), k3d::uuid::null(), and k3d::warning().
| void k3d::xml::detail::upgrade_poly_terrain_hfbm_nodes | ( | element & | XMLDocument | ) |
Upgrades PolyTerrainHfBm nodes so their "orientation" property is set correctly.
References k3d::xml::element::append(), k3d::xml::attribute_text(), k3d::xml::element::children, k3d::xml::find_element(), k3d::log(), k3d::uuid::null(), and k3d::warning().
| void k3d::xml::detail::upgrade_poly_text_nodes | ( | element & | XMLDocument | ) |
Upgrades PolyText nodes so their "orientation" property is set correctly.
References k3d::xml::element::append(), k3d::xml::attribute_text(), k3d::xml::element::children, k3d::xml::find_element(), k3d::log(), k3d::uuid::null(), and k3d::warning().
| void k3d::xml::detail::upgrade_property_object_elements | ( | element & | XMLDocument | ) |
Converts <object> tags to <property> tags.
References k3d::log(), vacuum::match, modifier::result, and k3d::warning().
| void k3d::xml::detail::upgrade_property_shader_elements | ( | element & | XMLDocument | ) |
Converts <shader> tags to <property> tags.
References k3d::log(), vacuum::match, modifier::result, and k3d::warning().
| void k3d::xml::detail::upgrade_property_values | ( | element & | XMLDocument | ) |
References k3d::log(), vacuum::match, k3d::xml::remove_attribute(), modifier::result, and k3d::warning().
| void k3d::xml::detail::upgrade_property_variable_elements | ( | element & | XMLDocument | ) |
Converts <variable> tags to <property> tags.
References k3d::log(), vacuum::match, modifier::result, and k3d::warning().
| void k3d::xml::detail::upgrade_to_object_attributes | ( | element & | XMLDocument | ) |
Converts "to_object" attributes to "to_node" attributes.
References k3d::xml::find_attribute(), k3d::log(), vacuum::match, k3d::xml::attribute::name, modifier::result, and k3d::warning().
| void k3d::xml::detail::upgrade_transformable_nodes | ( | element & | XMLDocument | ) |
Upgrades transformable nodes so that their position/orientation/scale properties are replaced with a Transform node.
References adjust_dependencies(), k3d::xml::attribute_text(), k3d::xml::element::children, k3d::xml::find_element(), k3d::classes::FrozenMatrix(), k3d::identity3(), k3d::log(), k3d::material::lookup(), max_node_id(), module::ode::node_factory(), k3d::uuid::null(), module::lsystem::lparser::orientation, k3d::position(), k3d::rotate3(), k3d::xml::element::safe_element(), mesh_modifier_script::scale, k3d::scale3(), k3d::string_cast(), k3d::xml::element::text, k3d::translate3(), and k3d::warning().
| void k3d::xml::detail::upgrade_user_property_types | ( | element & | XMLDocument | ) |
References k3d::log(), vacuum::match, modifier::result, k3d::xml::set_attribute(), and k3d::warning().
| void k3d::xml::detail::upgrade_variables_elements | ( | element & | XMLDocument | ) |
Converts <variables> tags to <properties> tags.
References k3d::log(), vacuum::match, modifier::result, and k3d::warning().
1.6.3