Loading...
Searching...
No Matches
EST_Pathname Class Reference

`#include <include/EST_Pathname.h>`

Inheritance diagram for EST_Pathname:
[legend]
Collaboration diagram for EST_Pathname:
[legend]

## Public Member Functions

| EST_Pathname (EST_String s)
| EST_Pathname (const char *s)
EST_Pathname | directory (void) const
EST_Pathname | filename (void) const
EST_String | basename (int remove_all=0) const
EST_String | extension (void) const
EST_Pathname | as_file (void) const
EST_Pathname | as_directory (void) const
int | is_absolute (void) const
int | is_relative (void) const
int | is_dirname (void) const
int | is_filename (void) const
EST_TList< EST_String > | entries (int check_for_directories=1) const
EST_Pathname & | operator+= (const char *addition)
EST_Pathname & | operator+= (const EST_String addition)
EST_Pathname & | operator+= (const EST_Pathname addition)
EST_Pathname | operator+ (const EST_String addition)
EST_Pathname | operator+ (const char *addition)
int | operator== (const EST_String thing)
int | operator== (const char *thing)
int | operator!= (const EST_String thing)
int | operator!= (const char *thing)
Public Member Functions inherited from EST_String
EST_String | before (int pos, int len=0) const
| Part before position.
EST_String | before (const char *s, int pos=0) const
| Part before first matching substring after pos.
EST_String | before (const EST_String &s, int pos=0) const
| Part before first matching substring after pos.
EST_String | before (EST_Regex &e, int pos=0) const
| Part before first match of regexp after pos.
EST_String | at (int from, int len=0) const
| Return part at position.
EST_String | at (const char *s, int pos=0) const
| Return part where substring found (not useful, included for completeness).
EST_String | at (const EST_String &s, int pos=0) const
| Return part where substring found (not useful, included for completeness).
EST_String | at (EST_Regex &e, int pos=0) const
| Return part matching regexp.
EST_String | after (int pos, int len=1) const
| Part after pos+len.
EST_String | after (const char *s, int pos=0) const
| Part after substring.
EST_String | after (const EST_String &s, int pos=0) const
| Part after substring.
EST_String | after (EST_Regex &e, int pos=0) const
| Part after match of regular expression.
int | search (const char *s, int len, int &mlen, int pos=0) const
| Find a substring.
int | search (const EST_String s, int &mlen, int pos=0) const
| Find a substring.
int | search (EST_Regex &re, int &mlen, int pos=0, int *starts=NULL, int *ends=NULL) const
| Find a match of the regular expression.
int | index (const char *s, int pos=0) const
| Position of substring (starting at pos).
int | index (const EST_String &s, int pos=0) const
| Position of substring (starting at pos).
int | index (EST_Regex &ex, int pos=0) const
| Position of match of regexp (starting at pos).
int | contains (const char *s, int pos=-1) const
| Does it contain this substring?
int | contains (const EST_String &s, int pos=-1) const
| Does it contain this substring?
int | contains (const char c, int pos=-1) const
| Does it contain this character?
int | contains (EST_Regex &ex, int pos=-1) const
| Does it contain a match for this regular expression?
int | matches (const char *e, int pos=0) const
| Exactly match this string?
int | matches (const EST_String &e, int pos=0) const
| Exactly match this string?
int | matches (EST_Regex &e, int pos=0, int *starts=NULL, int *ends=NULL) const
| Exactly matches this regular expression, can return ends of sub-expressions.
int | gsub (const char *os, const EST_String &s)
| Substitute one string for another.
int | gsub (const char *os, const char *s)
| Substitute one string for another.
int | gsub (const EST_String &os, const EST_String &s)
| Substitute one string for another.
int | gsub (const EST_String &os, const char *s)
| Substitute one string for another.
int | gsub (EST_Regex &ex, const EST_String &s)
| Substitute string for matches of regular expression.
int | gsub (EST_Regex &ex, const char *s)
| Substitute string for matches of regular expression.
int | gsub (EST_Regex &ex, int bracket_num)
| Substitute string for matches of regular expression.
int | subst (EST_String source, int(&starts)[EST_Regex_max_subexpressions], int(&ends)[EST_Regex_max_subexpressions])
| Substitute the result of a match into a string.
int | freq (const char *s) const
| Number of occurrences of substring.
int | freq (const EST_String &s) const
| Number of occurrences of substring.
int | freq (EST_Regex &s) const
| Number of matches of regular expression.
EST_String | quote (const char quotec) const
| Return the string in quotes with internal quotes protected.
EST_String | quote_if_needed (const char quotec) const
| Return in quotes if there is something to protect (e.g. spaces).
EST_String | unquote (const char quotec) const
| Remove quotes and unprotect internal quotes.
EST_String | unquote_if_needed (const char quotec) const
| Remove quotes if any.
const char | operator() (int i) const
| Function style access to constant strings.
char & | operator[] (int i)
| Array style access to writable strings.
| operator const char * () const
| Cast to const char * by simply giving access to pointer.
| operator const char * ()
| operator char * ()
| Cast to char *, may involve copying.
EST_String & | operator+= (const char *b)
| Add C string to end of EST_String.
EST_String & | operator+= (const EST_String b)
| Add EST_String to end of EST_String.
EST_String & | operator= (const char *str)
| Assign C string to EST_String.
EST_String & | ignore_volatile (void) volatile
| EST_String (void)
| Construct an empty string.
| EST_String (const char *s)
| Construct from char *.
| EST_String (const char *s, int start_or_fill, int len)
| Construct from part of char * or fill with given character.
| EST_String (const char *s, int s_size, int start, int len)
| Construct from C string.
| EST_String (const EST_String &s, int start, int len)
| ~EST_String ()
| Destructor.
int | length (void) const
| Length of string ({not} length of underlying chunk).
int | space (void) const
| Size of underlying chunk.
const char * | str (void) const
| Get a const-pointer to the actual memory.
char * | updatable_str (void)
| Get a writable pointer to the actual memory.
void | make_updatable (void)
int | Int (bool &ok) const
| Convert to an integer.
int | Int (void) const
long | Long (bool &ok) const
| Convert to a long.
long | Long (void) const
float | Float (bool &ok) const
| Convert to a float.
float | Float (void) const
double | Double (bool &ok) const
| Convert to a double.
double | Double (void) const

## Static Public Member Functions

static EST_Pathname | construct (EST_Pathname dir, EST_String basename, EST_String extension)
static EST_Pathname | construct (EST_Pathname dir, EST_String filename)
static EST_Pathname | append (EST_Pathname directory, EST_Pathname addition)
static void | divide (EST_Pathname path, int at, EST_Pathname &start, EST_Pathname &end)
static EST_String | cat (const EST_String s1, const EST_String s2=Empty, const EST_String s3=Empty, const EST_String s4=Empty, const EST_String s5=Empty, const EST_String s6=Empty, const EST_String s7=Empty, const EST_String s8=Empty, const EST_String s9=Empty)
static EST_String | FromChar (const char c)
| Build string from a single character.
static EST_String | Number (int i, int base=10)
| Build string from an integer.
static EST_String | Number (long i, int base=10)
| Build string from a long integer.
static EST_String | Number (double d)
| Build string from a double.
static EST_String | Number (float f)
| Build string from a float.

## Friends

EST_Pathname | operator+ (const EST_Pathname p, const EST_Pathname addition)
EST_Pathname | operator+ (const char *p, const EST_Pathname addition)

## Additional Inherited Members

Public Types inherited from EST_String
typedef int | EST_string_size
| Type of string size field.
Static Public Attributes inherited from EST_String
static const char * | version = "CSTR String Class " STRING_VERSION " " STRING_DATE
| Global version string.
static const EST_String | Empty
| Constant empty string.

## Detailed Description

Class representing pathnames. Makes common filename manipulations available as methods. Different implementations are provided for different systems.

Definition at line 44 of file EST_Pathname.h.

## Constructor & Destructor Documentation

## EST_Pathname() [1/3]

EST_Pathname::EST_Pathname | ( | void |  | ) |

inline

Definition at line 51 of file EST_Pathname.h.

## EST_Pathname() [2/3]

EST_Pathname::EST_Pathname | ( | EST_String | s | ) |

inline

Definition at line 52 of file EST_Pathname.h.

## EST_Pathname() [3/3]

EST_Pathname::EST_Pathname | ( | const char * | s | ) |

inline

Definition at line 53 of file EST_Pathname.h.

## Member Function Documentation

## construct() [1/2]

EST_Pathname EST_Pathname::construct | ( | EST_Pathname | dir,
|  | EST_String | basename,
|  | EST_String | extension )

static

Definition at line 110 of file EST_Pathname_unix.cc.

## construct() [2/2]

EST_Pathname EST_Pathname::construct | ( | EST_Pathname | dir,
|  | EST_String | filename )

static

Definition at line 101 of file EST_Pathname_unix.cc.

## directory()

EST_Pathname EST_Pathname::directory | ( | void |  | ) | const

Definition at line 63 of file EST_Pathname_unix.cc.

## filename()

EST_Pathname EST_Pathname::filename | ( | void |  | ) | const

Definition at line 187 of file EST_Pathname_unix.cc.

## basename()

EST_String EST_Pathname::basename | ( | int | remove_all = 0 | ) | const

Definition at line 196 of file EST_Pathname_unix.cc.

## extension()

EST_String EST_Pathname::extension | ( | void |  | ) | const

Definition at line 173 of file EST_Pathname_unix.cc.

## as_file()

EST_Pathname EST_Pathname::as_file | ( | void |  | ) | const

Definition at line 75 of file EST_Pathname_unix.cc.

## as_directory()

EST_Pathname EST_Pathname::as_directory | ( | void |  | ) | const

Definition at line 86 of file EST_Pathname_unix.cc.

## is_absolute()

int EST_Pathname::is_absolute | ( | void |  | ) | const

Definition at line 53 of file EST_Pathname_unix.cc.

## is_relative()

int EST_Pathname::is_relative | ( | void |  | ) | const

inline

Definition at line 68 of file EST_Pathname.h.

## is_dirname()

int EST_Pathname::is_dirname | ( | void |  | ) | const

Definition at line 58 of file EST_Pathname_unix.cc.

## is_filename()

int EST_Pathname::is_filename | ( | void |  | ) | const

inline

Definition at line 70 of file EST_Pathname.h.

## entries()

EST_TList< EST_String > EST_Pathname::entries | ( | int | check_for_directories = 1 | ) | const

Definition at line 118 of file EST_Pathname_unix.cc.

## append()

EST_Pathname EST_Pathname::append | ( | EST_Pathname | directory,
|  | EST_Pathname | addition )

static

Definition at line 158 of file EST_Pathname_unix.cc.

## operator+=() [1/3]

EST_Pathname & EST_Pathname::operator+= | ( | const char * | addition | ) |

inline

Definition at line 82 of file EST_Pathname.h.

## operator+=() [2/3]

EST_Pathname & EST_Pathname::operator+= | ( | const EST_String | addition | ) |

inline

Definition at line 84 of file EST_Pathname.h.

## operator+=() [3/3]

EST_Pathname & EST_Pathname::operator+= | ( | const EST_Pathname | addition | ) |

inline

Definition at line 86 of file EST_Pathname.h.

## operator+() [1/2]

EST_Pathname EST_Pathname::operator+ | ( | const EST_String | addition | ) |

inline

Definition at line 89 of file EST_Pathname.h.

## operator+() [2/2]

EST_Pathname EST_Pathname::operator+ | ( | const char * | addition | ) |

inline

Definition at line 91 of file EST_Pathname.h.

## operator==() [1/2]

int EST_Pathname::operator== | ( | const EST_String | thing | ) |

inline

Definition at line 94 of file EST_Pathname.h.

## operator==() [2/2]

int EST_Pathname::operator== | ( | const char * | thing | ) |

inline

Definition at line 96 of file EST_Pathname.h.

## operator!=() [1/2]

int EST_Pathname::operator!= | ( | const EST_String | thing | ) |

inline

Definition at line 98 of file EST_Pathname.h.

## operator!=() [2/2]

int EST_Pathname::operator!= | ( | const char * | thing | ) |

inline

Definition at line 100 of file EST_Pathname.h.

## Friends And Related Symbol Documentation

## operator+ [1/2]

EST_Pathname operator+ | ( | const EST_Pathname | p,
|  | const EST_Pathname | addition )

friend

Definition at line 145 of file EST_Pathname_unix.cc.

## operator+ [2/2]

EST_Pathname operator+ | ( | const char * | p,
|  | const EST_Pathname | addition )

friend

Definition at line 148 of file EST_Pathname_unix.cc.

The documentation for this class was generated from the following files:

- include/EST_Pathname.h
- base_class/EST_Pathname_unix.cc
- base_class/EST_Pathname_win32.cc