static void arv_gc_struct_entry_node_post_new_child (ArvDomNode *self, ArvDomNode *child) { ArvGcStructEntryNode *node = ARV_GC_STRUCT_ENTRY_NODE (self); if (ARV_IS_GC_PROPERTY_NODE (child)) { ArvGcPropertyNode *property_node = ARV_GC_PROPERTY_NODE (child); switch (arv_gc_property_node_get_node_type (property_node)) { case ARV_GC_PROPERTY_NODE_TYPE_SIGN: /* TODO */ node->sign = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_LSB: node->lsb = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_MSB: node->msb = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_BIT: node->msb = property_node; node->lsb = property_node; break; default: ARV_DOM_NODE_CLASS (parent_class)->post_new_child (self, child); break; } } }
static void arv_gc_boolean_post_new_child (ArvDomNode *self, ArvDomNode *child) { ArvGcBoolean *node = ARV_GC_BOOLEAN (self); if (ARV_IS_GC_PROPERTY_NODE (child)) { ArvGcPropertyNode *property_node = ARV_GC_PROPERTY_NODE (child); switch (arv_gc_property_node_get_node_type (property_node)) { case ARV_GC_PROPERTY_NODE_TYPE_VALUE: case ARV_GC_PROPERTY_NODE_TYPE_P_VALUE: node->value = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_ON_VALUE: node->on_value = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_OFF_VALUE: node->off_value = property_node; break; default: ARV_DOM_NODE_CLASS (parent_class)->post_new_child (self, child); break; } } }
static void arv_gc_swiss_knife_post_new_child (ArvDomNode *self, ArvDomNode *child) { ArvGcSwissKnife *node = ARV_GC_SWISS_KNIFE (self); if (ARV_IS_GC_PROPERTY_NODE (child)) { ArvGcPropertyNode *property_node = ARV_GC_PROPERTY_NODE (child); switch (arv_gc_property_node_get_node_type (property_node)) { case ARV_GC_PROPERTY_NODE_TYPE_P_VARIABLE: node->variables = g_slist_prepend (node->variables, property_node); break; case ARV_GC_PROPERTY_NODE_TYPE_FORMULA: node->formula_node = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_EXPRESSION: case ARV_GC_PROPERTY_NODE_TYPE_CONSTANT: arv_warning_genicam ("[GcSwissKnife::post_new_child] Constant and Expression not yet implemented"); break; default: ARV_DOM_NODE_CLASS (parent_class)->post_new_child (self, child); break; } } }
static void arv_gc_float_node_post_new_child (ArvDomNode *self, ArvDomNode *child) { ArvGcFloatNode *node = ARV_GC_FLOAT_NODE (self); if (ARV_IS_GC_PROPERTY_NODE (child)) { ArvGcPropertyNode *property_node = ARV_GC_PROPERTY_NODE (child); switch (arv_gc_property_node_get_node_type (property_node)) { case ARV_GC_PROPERTY_NODE_TYPE_VALUE: case ARV_GC_PROPERTY_NODE_TYPE_P_VALUE: node->value = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_MINIMUM: case ARV_GC_PROPERTY_NODE_TYPE_P_MINIMUM: node->minimum = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_MAXIMUM: case ARV_GC_PROPERTY_NODE_TYPE_P_MAXIMUM: node->maximum = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_INCREMENT: case ARV_GC_PROPERTY_NODE_TYPE_P_INCREMENT: node->increment = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_UNIT: node->unit = property_node; break; default: ARV_DOM_NODE_CLASS (parent_class)->post_new_child (self, child); break; } } }
static void arv_dom_text_class_init (ArvDomTextClass *klass) { ArvDomNodeClass *node_class = ARV_DOM_NODE_CLASS (klass); node_class->get_node_name = arv_dom_text_get_node_name; node_class->get_node_value = arv_dom_text_get_node_value; node_class->get_node_type = arv_dom_text_get_node_type; }
static void arv_gc_invalidator_node_class_init (ArvGcInvalidatorNodeClass *this_class) { ArvDomNodeClass *dom_node_class = ARV_DOM_NODE_CLASS (this_class); parent_class = g_type_class_peek_parent (this_class); dom_node_class->get_node_name = arv_gc_invalidator_node_get_node_name; }
static void arv_gc_class_init (ArvGcClass *node_class) { GObjectClass *object_class = G_OBJECT_CLASS (node_class); ArvDomNodeClass *d_node_class = ARV_DOM_NODE_CLASS (node_class); ArvDomDocumentClass *d_document_class = ARV_DOM_DOCUMENT_CLASS (node_class); parent_class = g_type_class_peek_parent (node_class); object_class->finalize = arv_gc_finalize; d_node_class->can_append_child = arv_gc_can_append_child; d_document_class->create_element = arv_gc_create_element; }
static void arv_dom_character_data_class_init (ArvDomCharacterDataClass *character_data_class) { GObjectClass *object_class = G_OBJECT_CLASS (character_data_class); ArvDomNodeClass *node_class = ARV_DOM_NODE_CLASS (character_data_class); parent_class = g_type_class_peek_parent (character_data_class); object_class->finalize = arv_dom_character_data_finalize; node_class->write_to_stream = arv_dom_character_data_write_to_stream; node_class->set_node_value = arv_dom_character_data_set_node_value; node_class->get_node_value = arv_dom_character_data_get_node_value; }
static void arv_gc_register_description_node_class_init (ArvGcRegisterDescriptionNodeClass *this_class) { GObjectClass *object_class = G_OBJECT_CLASS (this_class); ArvDomNodeClass *dom_node_class = ARV_DOM_NODE_CLASS (this_class); ArvDomElementClass *dom_element_class = ARV_DOM_ELEMENT_CLASS (this_class); parent_class = g_type_class_peek_parent (this_class); object_class->finalize = arv_gc_register_description_node_finalize; dom_node_class->get_node_name = arv_gc_register_description_node_get_node_name; dom_element_class->set_attribute = arv_gc_register_description_node_set_attribute; dom_element_class->get_attribute = arv_gc_register_description_node_get_attribute; }
static void arv_gc_variable_node_class_init (ArvGcVariableNodeClass *this_class) { GObjectClass *object_class = G_OBJECT_CLASS (this_class); ArvDomNodeClass *dom_node_class = ARV_DOM_NODE_CLASS (this_class); ArvDomElementClass *dom_element_class = ARV_DOM_ELEMENT_CLASS (this_class); parent_class = g_type_class_peek_parent (this_class); object_class->finalize = arv_gc_variable_node_finalize; dom_node_class->get_node_name = arv_gc_variable_node_get_node_name; dom_node_class->can_append_child = arv_gc_variable_node_can_append_child; dom_element_class->set_attribute = arv_gc_variable_node_set_attribute; dom_element_class->get_attribute = arv_gc_variable_node_get_attribute; }
static void arv_gc_swiss_knife_class_init (ArvGcSwissKnifeClass *this_class) { GObjectClass *object_class = G_OBJECT_CLASS (this_class); ArvDomNodeClass *dom_node_class = ARV_DOM_NODE_CLASS (this_class); ArvGcFeatureNodeClass *gc_feature_node_class = ARV_GC_FEATURE_NODE_CLASS (this_class); parent_class = g_type_class_peek_parent (this_class); object_class->finalize = arv_gc_swiss_knife_finalize; dom_node_class->get_node_name = arv_gc_swiss_knife_get_node_name; dom_node_class->post_new_child = arv_gc_swiss_knife_post_new_child; dom_node_class->pre_remove_child = arv_gc_swiss_knife_pre_remove_child; gc_feature_node_class->get_value_type = arv_gc_swiss_knife_node_get_value_type; }
static void arv_gc_boolean_class_init (ArvGcBooleanClass *this_class) { GObjectClass *object_class = G_OBJECT_CLASS (this_class); ArvDomNodeClass *dom_node_class = ARV_DOM_NODE_CLASS (this_class); ArvGcFeatureNodeClass *gc_feature_node_class = ARV_GC_FEATURE_NODE_CLASS (this_class); parent_class = g_type_class_peek_parent (this_class); object_class->finalize = arv_gc_boolean_finalize; dom_node_class->get_node_name = arv_gc_boolean_get_node_name; dom_node_class->post_new_child = arv_gc_boolean_post_new_child; dom_node_class->pre_remove_child = arv_gc_boolean_pre_remove_child; gc_feature_node_class->set_value_from_string = arv_gc_boolean_set_value_from_string; gc_feature_node_class->get_value_as_string = arv_gc_boolean_get_value_as_string; }
static void arv_gc_feature_node_class_init (ArvGcFeatureNodeClass *this_class) { GObjectClass *object_class = G_OBJECT_CLASS (this_class); ArvDomNodeClass *dom_node_class = ARV_DOM_NODE_CLASS (this_class); ArvDomElementClass *dom_element_class = ARV_DOM_ELEMENT_CLASS (this_class); g_type_class_add_private (this_class, sizeof (ArvGcFeatureNodePrivate)); parent_class = g_type_class_peek_parent (this_class); object_class->finalize = arv_gc_feature_node_finalize; dom_node_class->can_append_child = arv_gc_feature_node_can_append_child; dom_node_class->post_new_child = arv_gc_feature_node_post_new_child; dom_node_class->pre_remove_child = arv_gc_feature_node_pre_remove_child; dom_element_class->set_attribute = arv_gc_feature_node_set_attribute; dom_element_class->get_attribute = arv_gc_feature_node_get_attribute; this_class->get_value_type = NULL; }
static void arv_gc_enumeration_post_new_child (ArvDomNode *self, ArvDomNode *child) { ArvGcEnumeration *node = ARV_GC_ENUMERATION (self); if (ARV_IS_GC_PROPERTY_NODE (child)) { ArvGcPropertyNode *property_node = ARV_GC_PROPERTY_NODE (child); switch (arv_gc_property_node_get_node_type (property_node)) { case ARV_GC_PROPERTY_NODE_TYPE_VALUE: case ARV_GC_PROPERTY_NODE_TYPE_P_VALUE: node->value = property_node; break; default: ARV_DOM_NODE_CLASS (parent_class)->post_new_child (self, child); break; } } else if (ARV_IS_GC_ENUM_ENTRY (child)) node->entries = g_slist_prepend (node->entries, child); }
static void arv_gc_converter_post_new_child (ArvDomNode *self, ArvDomNode *child) { ArvGcConverter *node = ARV_GC_CONVERTER (self); if (ARV_IS_GC_PROPERTY_NODE (child)) { ArvGcPropertyNode *property_node = ARV_GC_PROPERTY_NODE (child); switch (arv_gc_property_node_get_node_type (property_node)) { case ARV_GC_PROPERTY_NODE_TYPE_P_VARIABLE: node->variables = g_slist_prepend (node->variables, property_node); break; case ARV_GC_PROPERTY_NODE_TYPE_P_VALUE: node->value = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_FORMULA_TO: node->formula_to_node = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_FORMULA_FROM: node->formula_from_node = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_EXPRESSION: node->expressions = g_slist_prepend (node->expressions, property_node); break; case ARV_GC_PROPERTY_NODE_TYPE_CONSTANT: node->constants = g_slist_prepend (node->constants, property_node); break; case ARV_GC_PROPERTY_NODE_TYPE_UNIT: node->unit = property_node; break; default: ARV_DOM_NODE_CLASS (parent_class)->post_new_child (self, child); break; } } }
static void arv_gc_register_node_post_new_child (ArvDomNode *self, ArvDomNode *child) { ArvGcRegisterNode *node = ARV_GC_REGISTER_NODE (self); if (ARV_IS_GC_PROPERTY_NODE (child)) { ArvGcPropertyNode *property_node = ARV_GC_PROPERTY_NODE (child); switch (arv_gc_property_node_get_node_type (property_node)) { case ARV_GC_PROPERTY_NODE_TYPE_ADDRESS: case ARV_GC_PROPERTY_NODE_TYPE_P_ADDRESS: node->addresses = g_slist_prepend (node->addresses, child); break; case ARV_GC_PROPERTY_NODE_TYPE_P_INDEX: node->index = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_LENGTH: case ARV_GC_PROPERTY_NODE_TYPE_P_LENGTH: node->length = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_P_PORT: node->port = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_ACCESS_MODE: /* TODO */ node->access_mode = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_CACHABLE: node->cachable = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_POLLING_TIME: /* TODO */ node->polling_time = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_ENDIANESS: node->endianess = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_SIGN: /* TODO */ node->sign = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_LSB: node->lsb = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_MSB: node->msb = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_BIT: node->msb = property_node; node->lsb = property_node; break; case ARV_GC_PROPERTY_NODE_TYPE_P_INVALIDATOR: node->invalidators = g_slist_prepend (node->invalidators, property_node); break; default: ARV_DOM_NODE_CLASS (parent_class)->post_new_child (self, child); break; } } else if (ARV_IS_GC_SWISS_KNIFE (child)) node->swiss_knives = g_slist_prepend (node->swiss_knives, child); else ARV_DOM_NODE_CLASS (parent_class)->post_new_child (self, child); }