Texture Viewer
|
Public Member Functions | |
AbstractTool ()=default | |
virtual | ~AbstractTool () |
virtual QByteArray | id () const =0 |
virtual QString | decription () const =0 |
virtual int | run (const QStringList &arguments)=0 |
This is the base class for texture tools.
|
default |
Constructs an AbstractTool instance.
|
virtualdefault |
Destroys the AbstractTool object.
|
pure virtual |
Reimplement this function to return the decription of the tool. Description is used when help of the main program is printed.
Implemented in TextureTool::ConvertTool, and TextureTool::ShowTool.
|
pure virtual |
Reimplement this function to return the id of the tool. This id is used a command name when invoking main program: ./texturetool <id> [options]
Implemented in TextureTool::ConvertTool, and TextureTool::ShowTool.
|
pure virtual |
Reimplement this function to implement the logic of the tool.
When tool is invoked via ./texturetool <id> [options], arguments contains options passed to the tool. Tool should return 0 in case of success or non-zero in case of an error. Also, it can throw an exception that is caught by the main program.
Implemented in TextureTool::ConvertTool, and TextureTool::ShowTool.