Class AttrName
Defined in File attrName.h
Class Documentation
-
class AttrName
The AttrName class handles the reading and storage of attribute and class names from a file.
Public Functions
-
int ReadAttr()
Reads the attribute and class names from the file.
- Returns:
1 if successful, 0 otherwise.
-
inline int IsFileAttr() const
Checks if the attribute file is set.
- Returns:
1 if the file is set, 0 otherwise.
-
inline std::vector<std::string> GetListAttr() const
Gets the list of attribute names.
- Returns:
A vector of attribute names.
-
inline std::vector<std::string> GetListClasses() const
Gets the list of class names.
- Returns:
A vector of class names.
-
AttrName(const std::string &fileAttr, int nbAttr, int nbClasses)
Constructs an AttrName object.
- Parameters:
fileAttr – The file containing attribute and class names.
nbAttr – The number of attributes.
nbClasses – The number of classes.
-
AttrName() = default
Default constructor.
-
int ReadAttr()