66 const std::string&
string);
67 friend std::string
operator+(
const std::string&
string,
82 operator std::string(
void)
const;
90 std::string
url(
void)
const;
92 std::string
path(
void)
const;
93 std::string
file(
void)
const;
94 std::string
type(
void)
const;
97 void remove(void)
const;
98 std::string
extname(
const std::string& defaultname =
"")
const;
100 int extno(
const int& defaultno = -1)
const;
101 int extver(
const int& defaultver = 0)
const;
136 GFilename::operator std::string(
void)
const
150 return (
"GFilename");
176 return ((
int)
m_url.length());
307 return (std::string(filename)+
string);
321 return (
string+std::string(filename));
335 return (std::string(a) == std::string(b));
349 return (std::string(a) != std::string(b));
std::string file(void) const
Return name of file.
std::string protocol(void) const
Return access protocol.
void free_members(void)
Delete class members.
bool has_extno(void) const
Signal if filename has an extension number.
bool has_expression(void) const
Signal if filename has an expression.
bool has_extver(void) const
Signal if filename has an extension version.
void copy_members(const GFilename &filename)
Copy class members.
std::string m_protocol
Access protocol.
std::string m_expression
Selection expression ("": not set)
int m_extver
Extension version (0: not set)
const std::string & expression(void) const
Return expression name.
std::string m_path
Access path.
bool is_empty(void) const
Signal if filename is empty.
int extver(const int &defaultver=0) const
Return extension version number.
Definition of interface for all GammaLib classes.
bool has_extname(void) const
Signal if filename has an extension name.
int length(void) const
Return length of filename.
std::string extname(const std::string &defaultname="") const
Return extension name.
void set_filename(const std::string &filename)
Set file name.
void init_members(void)
Initialise class members.
GFilename * clone(void) const
Clone file name.
std::string m_filename
Full file name.
GArf operator+(const GArf &a, const GArf &b)
Auxiliary Response File addition operator friend.
std::string m_url
File name (with stripped extension info)
GFilename & operator=(const GFilename &filename)
Assignment operator.
virtual ~GFilename(void)
Destructor.
std::string path(void) const
Return access path.
int m_extno
Extension number (-1: not set)
GFilename(void)
Void constructor.
friend std::string operator+(const GFilename &filename, const std::string &string)
String addition operator.
friend bool operator!=(const GFilename &a, const GFilename &b)
Filename inequality operator.
Interface class for all GammaLib classes.
std::string m_extname
Extension name ("": not set)
bool exists(void) const
Checks whether file exists.
bool is_fits(void) const
Checks whether file is a FITS file.
std::string type(void) const
Return file type.
std::string url(void) const
Return Uniform Resource Locator (URL)
void clear(void)
Clear file name.
std::string classname(void) const
Return class name.
int extno(const int &defaultno=-1) const
Return extension number.
std::string expand_env(const std::string &arg)
Expand environment variables in string.
friend bool operator==(const GFilename &a, const GFilename &b)
Filename equality operator.
bool operator==(const GEnergy &a, const GEnergy &b)
Energy equality operator friend.
bool operator!=(const GEbounds &a, const GEbounds &b)
Energy boundaries inequality operator friend.
std::string m_file
Name of file.
std::string print(const GChatter &chatter=NORMAL) const
Print file name information.