HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_PathSearch Class Reference

#include <UT_PathSearch.h>

Classes

struct  CommonPaths
 

Public Member Functions

 UT_PathSearch (const char *defpath, int var_id, const char *carat_expand="", int at_expand=UT_HOUDINI_PATH)
 
 UT_PathSearch (const UT_PathSearch &copy)=default
 
void rehash ()
 
void extendPath (const char *defpath=0, int var_id=-1, const char *carat_expand=0, int at_expand=-1)
 
void appendPath (const char *path)
 
void prependPath (const char *path)
 
int findFile (UT_String &result, const char *search) const
 
int findFile (UT_WorkBuffer &result, const char *search) const
 
int findDirectory (UT_String &result, const char *search) const
 
bool findFileFromList (UT_String &result, const UT_StringArray &search_list) const
 
bool findDirectoryFromList (UT_String &result, const UT_StringArray &search_list) const
 
int findAllFiles (const char *search, UT_StringArray &list) const
 
int findAllDirectories (const char *search, UT_StringArray &list) const
 
int matchAllFiles (const char *extension, bool returnfullpaths, UT_StringArray &list, bool recurse=false, bool skip_dup_paths=false) const
 
int matchAllFiles (const UT_StringList &exts, bool returnfullpaths, UT_StringArray &list, bool recurse=false, bool skip_dup_paths=false) const
 
int matchAllFilesInSubdirectory (const char *extension, const char *subdirectory, bool returnfullpaths, UT_StringArray &list, bool recurse=false, bool skip_dup_paths=false) const
 
int houdiniFindFile (const char *find, UT_String &result) const
 
int houdiniFindFile (const char *find, UT_WorkBuffer &result) const
 
int houdiniFindDirectory (const char *find, UT_String &result) const
 
int houdiniFindDirectory (const char *find, UT_WorkBuffer &r) const
 
int getEntries () const
 
const char * getPathComponent (int i) const
 
int getBaseEntries () const
 
const char * getBaseComponent (int i) const
 
const char * getCondensedComponent (int i) const
 
const char * getDefaultPath () const
 
const char * getCaratExpand () const
 
int getVariableId () const
 
int getAtExpand () const
 

Static Public Member Functions

static bool pathMap (UT_String &path)
 
static void pathMapSave (UT_WorkBuffer &wbuf, bool pretty)
 
static void pathMapLoad (const char *dict)
 
static void pathMapAdd (const char *src, const char *dest, bool case_sensitive)
 
static bool pathMapRemove (const char *src)
 
static UT_KnownPath lookupPath (const char *name)
 
static const char * lookupPath (UT_KnownPath path)
 
static const UT_PathSearchgetInstance (UT_KnownPath path_type)
 
static UT_PathSearchgetHardPath (UT_KnownPath path_type)
 
static void rehashAll ()
 
static void rehashSpecific (UT_KnownPath pathid)
 
static void getHomeHoudini (UT_String &str)
 
static int condenseHip (UT_String &path)
 
static int condenseHip (UT_WorkBuffer &path)
 
static int condenseJob (UT_String &path)
 
static bool condensePath (UT_WorkBuffer &result, const char *source_path, const char *const paths[], const char *const condensed_paths[], int npaths)
 
static bool condensePath (UT_String &path, const char *source_path, const char *const paths[], const char *const condensed_paths[], int npaths)
 
static bool condensePath (UT_String &path, const char *const paths[], const char *const condensed_paths[], int npaths)
 
static int stripLeadPath (UT_String &path, UT_KnownPath pathvar)
 
static int stripMaxLeadPath (UT_String &path, UT_KnownPath pathvar)
 
static bool resolveAbsolutePath (const char *filename, UT_String &absolute_path)
 
static bool condenseCommon (UT_String &path)
 
static bool condenseCommon (UT_WorkBuffer &path)
 
static bool condenseCommon (UT_String &condensed, const char *path)
 
static bool condenseCommon (UT_WorkBuffer &condensed, const char *path)
 
static bool condenseCommon (UT_String &path, const CommonPaths &common)
 
static bool condenseCommon (UT_WorkBuffer &path, const CommonPaths &common)
 
static bool condenseCommon (UT_String &path, const char *source_path, const CommonPaths &common)
 
static bool condenseCommon (UT_WorkBuffer &path, const char *source_path, const CommonPaths &common)
 

Detailed Description

Definition at line 115 of file UT_PathSearch.h.

Constructor & Destructor Documentation

UT_PathSearch::UT_PathSearch ( const char *  defpath,
int  var_id,
const char *  carat_expand = "",
int  at_expand = UT_HOUDINI_PATH 
)
UT_PathSearch::UT_PathSearch ( const UT_PathSearch copy)
default

Member Function Documentation

void UT_PathSearch::appendPath ( const char *  path)
static bool UT_PathSearch::condenseCommon ( UT_String path)
inlinestatic

Definition at line 273 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_WorkBuffer path)
inlinestatic

Definition at line 283 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_String condensed,
const char *  path 
)
inlinestatic

Definition at line 293 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_WorkBuffer condensed,
const char *  path 
)
inlinestatic

Definition at line 303 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_String path,
const CommonPaths common 
)
inlinestatic

Definition at line 310 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_WorkBuffer path,
const CommonPaths common 
)
inlinestatic

Definition at line 316 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_String path,
const char *  source_path,
const CommonPaths common 
)
inlinestatic

Definition at line 322 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_WorkBuffer path,
const char *  source_path,
const CommonPaths common 
)
inlinestatic

Definition at line 330 of file UT_PathSearch.h.

static int UT_PathSearch::condenseHip ( UT_String path)
static
static int UT_PathSearch::condenseHip ( UT_WorkBuffer path)
static
static int UT_PathSearch::condenseJob ( UT_String path)
static
static bool UT_PathSearch::condensePath ( UT_WorkBuffer result,
const char *  source_path,
const char *const  paths[],
const char *const  condensed_paths[],
int  npaths 
)
static
static bool UT_PathSearch::condensePath ( UT_String path,
const char *  source_path,
const char *const  paths[],
const char *const  condensed_paths[],
int  npaths 
)
inlinestatic

Definition at line 349 of file UT_PathSearch.h.

static bool UT_PathSearch::condensePath ( UT_String path,
const char *const  paths[],
const char *const  condensed_paths[],
int  npaths 
)
inlinestatic

Definition at line 366 of file UT_PathSearch.h.

void UT_PathSearch::extendPath ( const char *  defpath = 0,
int  var_id = -1,
const char *  carat_expand = 0,
int  at_expand = -1 
)
int UT_PathSearch::findAllDirectories ( const char *  search,
UT_StringArray list 
) const
int UT_PathSearch::findAllFiles ( const char *  search,
UT_StringArray list 
) const
int UT_PathSearch::findDirectory ( UT_String result,
const char *  search 
) const
bool UT_PathSearch::findDirectoryFromList ( UT_String result,
const UT_StringArray search_list 
) const
int UT_PathSearch::findFile ( UT_String result,
const char *  search 
) const
int UT_PathSearch::findFile ( UT_WorkBuffer result,
const char *  search 
) const
bool UT_PathSearch::findFileFromList ( UT_String result,
const UT_StringArray search_list 
) const
int UT_PathSearch::getAtExpand ( ) const
inline

Definition at line 242 of file UT_PathSearch.h.

const char* UT_PathSearch::getBaseComponent ( int  i) const
inline

Definition at line 234 of file UT_PathSearch.h.

int UT_PathSearch::getBaseEntries ( ) const
inline

Definition at line 233 of file UT_PathSearch.h.

const char* UT_PathSearch::getCaratExpand ( ) const
inline

Definition at line 239 of file UT_PathSearch.h.

const char* UT_PathSearch::getCondensedComponent ( int  i) const
inline

Definition at line 235 of file UT_PathSearch.h.

const char* UT_PathSearch::getDefaultPath ( ) const
inline

Definition at line 238 of file UT_PathSearch.h.

int UT_PathSearch::getEntries ( ) const
inline

Definition at line 228 of file UT_PathSearch.h.

static UT_PathSearch* UT_PathSearch::getHardPath ( UT_KnownPath  path_type)
static
static void UT_PathSearch::getHomeHoudini ( UT_String str)
static
static const UT_PathSearch* UT_PathSearch::getInstance ( UT_KnownPath  path_type)
static
const char* UT_PathSearch::getPathComponent ( int  i) const
inline

Definition at line 229 of file UT_PathSearch.h.

int UT_PathSearch::getVariableId ( ) const
inline

Definition at line 241 of file UT_PathSearch.h.

int UT_PathSearch::houdiniFindDirectory ( const char *  find,
UT_String result 
) const
int UT_PathSearch::houdiniFindDirectory ( const char *  find,
UT_WorkBuffer r 
) const
int UT_PathSearch::houdiniFindFile ( const char *  find,
UT_String result 
) const
int UT_PathSearch::houdiniFindFile ( const char *  find,
UT_WorkBuffer result 
) const
static UT_KnownPath UT_PathSearch::lookupPath ( const char *  name)
static

Given a variable name (e.g. "HOUDINI_PATH") return the known path enum associated with it. If the name doesn't match a known path, the function will return UT_MAX_KNOWN_PATHS.

static const char* UT_PathSearch::lookupPath ( UT_KnownPath  path)
static

Given a known path, return the variable name associated with the path Returns nullptr on error.

int UT_PathSearch::matchAllFiles ( const char *  extension,
bool  returnfullpaths,
UT_StringArray list,
bool  recurse = false,
bool  skip_dup_paths = false 
) const
int UT_PathSearch::matchAllFiles ( const UT_StringList exts,
bool  returnfullpaths,
UT_StringArray list,
bool  recurse = false,
bool  skip_dup_paths = false 
) const
int UT_PathSearch::matchAllFilesInSubdirectory ( const char *  extension,
const char *  subdirectory,
bool  returnfullpaths,
UT_StringArray list,
bool  recurse = false,
bool  skip_dup_paths = false 
) const
static bool UT_PathSearch::pathMap ( UT_String path)
static
static void UT_PathSearch::pathMapAdd ( const char *  src,
const char *  dest,
bool  case_sensitive 
)
static
static void UT_PathSearch::pathMapLoad ( const char *  dict)
static
static bool UT_PathSearch::pathMapRemove ( const char *  src)
static
static void UT_PathSearch::pathMapSave ( UT_WorkBuffer wbuf,
bool  pretty 
)
static
void UT_PathSearch::prependPath ( const char *  path)
void UT_PathSearch::rehash ( )
static void UT_PathSearch::rehashAll ( )
static
static void UT_PathSearch::rehashSpecific ( UT_KnownPath  pathid)
static
static bool UT_PathSearch::resolveAbsolutePath ( const char *  filename,
UT_String absolute_path 
)
static
static int UT_PathSearch::stripLeadPath ( UT_String path,
UT_KnownPath  pathvar 
)
static
static int UT_PathSearch::stripMaxLeadPath ( UT_String path,
UT_KnownPath  pathvar 
)
static

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