a string comparison is not a good solution then rather use typeid(this) == typeid(df)