Concept of Property class to be given to ESBTL::Generic_classifier
struct Base_property_concept{ typedef ... Query_type; // the object type to which properties are associated typedef ... Key_type; // the hash key type //Constructor using a string stream (from file for example) //Defines a new property from a string. index indicates its position in the property vector. Base_property_concept(std::stringstream& ss,unsigned index){ ... } //Create a key from a Query_type object static Key_type make_key(const Query_type& query){ ... } //Static methods indicating what are the default properties associated // -Dictionary an associative container, mapping a Query_type to the index of a property. // -Vector_properties is a vector containing all the properties. // -The integer returned is the size of the property vector. template <class Dictionary,class Vector_properties> static unsigned default_loader(Dictionary& dict,Vector_properties& vect){ ... } //Static methods indicating how to add to read a classification from a string stream (from a file for example) // Dictionary is a container associating an Key_type object to an unsigned integer (index of the property). // The unsigned integer return is the index of the property the object is associated to. template <class Dictionary> static unsigned add_classification(std::stringstream& ss,Dictionary& dict){ ... } //Static methods to handle extra information read from a string stream (from a file for example). static void handle_extra(std::stringstream& ss){ ... } //This function returns the index returned by default when no entry is found in the dictionary. //If the integer returned is -1, then this indicates that no default properties are expected to be provided //and will result in an error message. static int& index_of_default(){ ... } };