Feature #1599

Add GFilename class

Added by Knödlseder Jürgen over 8 years ago. Updated over 8 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:-
Duration:

Description

Add GFilename class to replace ultimately all std::string argument used for filenames.

The class should have a std::string constructor and implement at least the following methods:
  • empty: true if filename is empty, false otherwise (to emulate std::string)
  • size: length of the filename (to emulate std::string)
  • length: length of the filename (to emulate std::string)
  • clear: length of the filename (to emulate std::string)
  • filename: return filename part
  • extname: return extname part (empty is it does not exist)
  • extno: return extno part (-1 if it does not exist)
  • extver: return extvar part (-1 if it does not exist)
  • has_extname: true if extname was found
  • has_extno: true if extno was found
  • has_extver: true if extver was found
  • default_extname: set default extname if no extname par was found (allows setting default extname and have it ovrewritten by the user choice)

The goal of the emulation methods is to not alter the user interface when replacing std::string by GFilename.

I do not propose to replace std::string by GFilename in release 1.0, but I propose to implement the class and use it internally to handle the CTA response files.


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 8 years ago

  • Status changed from New to Closed
  • Assigned To set to Knödlseder Jürgen
  • % Done changed from 0 to 100

Implemented and merged into devel.

Also available in: Atom PDF