Changeset 93:8d20c0a4f746 in rrlib_util


Ignore:
Timestamp:
18.09.2013 18:34:01 (6 years ago)
Author:
Jens Wettach <wettach@…>
Branch:
default
Phase:
public
Message:

added convenience function

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sFileIOUtils.cpp

    r84 r93  
    237237// class sFileIOUtils::ShellExpandFilename() 
    238238//---------------------------------------------------------------------- 
     239std::string sFileIOUtils::ShellExpandFilename(const std::string &file_name) 
     240{ 
     241  std::string result(""); 
     242  if (ShellExpandFilename(result, file_name)) 
     243    return result; 
     244  else 
     245    return ""; 
     246} // ShellExpandFilename() 
     247 
     248 
     249//---------------------------------------------------------------------- 
     250// class sFileIOUtils::ShellExpandFilename() 
     251//---------------------------------------------------------------------- 
    239252bool sFileIOUtils::ShellExpandFilename(std::string &result, const std::string &file_name) 
    240253{ 
  • sFileIOUtils.h

    r91 r93  
    228228 
    229229  /*! Expands the given filename via a pipe and echo command in order to replace all contained environment variables with their actual value. 
     230   * 
     231   * \param file_name   file name to be expanded 
     232   * 
     233   * \returns Expanded file name 
     234   */ 
     235  static std::string ShellExpandFilename(const std::string &file_name)  __attribute__((__warn_unused_result__)); 
     236 
     237  /*! Expands the given filename via a pipe and echo command in order to replace all contained environment variables with their actual value. 
    230238  * 
    231239  * Thus variables as e.g. $MCAPROJECTHOME can be used for specifying OIV files in scene description files. 
Note: See TracChangeset for help on using the changeset viewer.