LttvAttributeType lttv_iattribute_get(LttvIAttribute *self, unsigned i,
- LttvAttributeName *name, LttvAttributeValue *v)
+ LttvAttributeName *name, LttvAttributeValue *v, gboolean *is_named)
{
- return LTTV_IATTRIBUTE_GET_CLASS (self)->get (self, i, name, v);
+ return LTTV_IATTRIBUTE_GET_CLASS (self)->get (self, i, name, v, is_named);
}
return LTTV_IATTRIBUTE_GET_CLASS (self)->add (self, name, t);
}
+LttvAttributeValue lttv_iattribute_add_unnamed(LttvIAttribute *self,
+ LttvAttributeName name, LttvAttributeType t)
+{
+ return LTTV_IATTRIBUTE_GET_CLASS (self)->add_unnamed (self, name, t);
+}
void lttv_iattribute_remove(LttvIAttribute *self, unsigned i)
{
return LTTV_IATTRIBUTE_GET_CLASS (self)->find_subdir (self, name);
}
+LttvIAttribute* lttv_iattribute_find_subdir_unnamed(LttvIAttribute *self,
+ LttvAttributeName name)
+{
+ return LTTV_IATTRIBUTE_GET_CLASS (self)->find_subdir_unnamed (self, name);
+}
+
+
/* Find the named attribute in the table, which must be of the specified type.
If it does not exist, it is created with a default value of 0 (NULL for
LttvAttributeName name;
+ gboolean is_named;
+
int i;
int nb_attributes = lttv_iattribute_get_number(self);
copy = LTTV_IATTRIBUTE_GET_CLASS(self)->new_attribute(NULL);
for(i = 0 ; i < nb_attributes ; i++) {
- t = lttv_iattribute_get(self, i, &name, &v);
- v_copy = lttv_iattribute_add(copy, name, t);
+ t = lttv_iattribute_get(self, i, &name, &v, &is_named);
+ if(is_named)
+ v_copy = lttv_iattribute_add(copy, name, t);
+ else
+ v_copy = lttv_iattribute_add_unnamed(copy, name, t);
lttv_iattribute_copy_value(t, v_copy, v);
}
return copy;
LttvAttributeName name;
+ gboolean is_named;
+
int i;
int nb_attributes = lttv_iattribute_get_number(self);
copy = LTTV_IATTRIBUTE_GET_CLASS(self)->new_attribute(NULL);
for(i = 0 ; i < nb_attributes ; i++) {
- t = lttv_iattribute_get(self, i, &name, &v);
- v_copy = lttv_iattribute_add(copy, name, t);
+ t = lttv_iattribute_get(self, i, &name, &v, &is_named);
+ if(is_named)
+ v_copy = lttv_iattribute_add(copy, name, t);
+ else
+ v_copy = lttv_iattribute_add_unnamed(copy, name, t);
if(t == LTTV_GOBJECT && LTTV_IS_IATTRIBUTE(*(v.v_gobject))) {
child = LTTV_IATTRIBUTE(*(v.v_gobject));
*(v_copy.v_gobject) = G_OBJECT(lttv_iattribute_deep_copy(child));