Beispiel #1
0
status_t Preferences::SetFlat (const char *name, const BFlattenable *obj)
{
	if (HasFlat (name, obj) == true)
		return ReplaceFlat (name, 0, (BFlattenable*)obj);

	return AddFlat (name, (BFlattenable*) obj);
}
Beispiel #2
0
status_t
AttributeMessage::SetAttribute(const char* name, const BFlattenable* value)
{
	if (ReplaceFlat(name, const_cast<BFlattenable*>(value)) == B_OK)
		return B_OK;
	return AddFlat(name, const_cast<BFlattenable*>(value));
}