// line.h // // Class to hold line information #ifndef _LINE_H_ #define _LINE_H_ #include "idman.h" class Line : public mcThing { CString name; CString colour; CString code; public: Line(mcContext *mgr, const CString &a_name, const CString &a_colour, const CString &a_code) : mcThing(mgr) ,name(a_name) ,colour(a_colour) ,code(a_code) { } // Accessors CString getName() { return name; } void setName(CString name) { this->name = name; } CString getColour() { return colour; } void setColour(CString colour) { this->colour = colour; } CString getCode() { return code; } void setCode(const CString &code) { this->code = code; } mcThing::type getType() { return mcThing::LINE; } // SQL members CString getSqlTable() { return "LINE"; } CString getSqlInsertData() { // LINES := ID, NAME, COLOUR, CODE return CNumString(getId()) + ", " + literal(name) + ", " + literal(colour) + ", " + literal(code); } }; #endif // _LINE_H_