<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Exiv2: utils.hpp File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>utils.hpp File Reference</h1>A collection of utility functions. <a href="#_details">More...</a> <p> <code>#include <string></code><br> <p> <div class="dynheader"> Include dependency graph for utils.hpp:</div> <div class="dynsection"> <p><center><img src="utils_8hpp__incl.png" border="0" usemap="#utils.hpp_map" alt=""></center> </div> <p> <div class="dynheader"> This graph shows which files directly or indirectly include this file:</div> <div class="dynsection"> <p><center><img src="utils_8hpp__dep__incl.png" border="0" usemap="#utils.hppdep_map" alt=""></center> <map name="utils.hppdep_map"> <area shape="rect" id="node3" href="exiv2_8hpp.html" title="Defines class Params, used for the command line handling of exiv2." alt="" coords="15,80,127,107"><area shape="rect" id="node7" href="metacopy_8hpp.html" title="Defines class Params, used for the command line handling." alt="" coords="151,80,292,107"><area shape="rect" id="node5" href="actions_8hpp.html" title="Implements base class Task, TaskFactory and the various supported actions (derived..." alt="" coords="5,155,136,181"></map> </div> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Classes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classUtil_1_1Getopt.html">Util::Getopt</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Parse the command line options of a program. <a href="classUtil_1_1Getopt.html#_details">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Namespaces</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">namespace </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceUtil.html">Util</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Contains utility classes and functions. Most of these are wrappers for common C functions that do not require pointers and memory considerations. <br></td></tr> <p> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceUtil.html#2d5eb823f2910e392a04c146c54f9543">Util::dirname</a> (const std::string &path)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the directory component from the <em>path</em> string. See dirname(3). <a href="#2d5eb823f2910e392a04c146c54f9543"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceUtil.html#0ec92119bdb7f1269693f1ee94d360ea">Util::basename</a> (const std::string &path, bool delsuffix=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the filename component from the <em>path</em> string. See basename(3). If the <em>delsuffix</em> parameter is true, the suffix will be removed. <a href="#0ec92119bdb7f1269693f1ee94d360ea"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a61f770944bfdb930ec8241c529887b8"></a><!-- doxytag: member="utils.hpp::suffix" ref="a61f770944bfdb930ec8241c529887b8" args="(const std::string &path)" --> std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceUtil.html#a61f770944bfdb930ec8241c529887b8">Util::suffix</a> (const std::string &path)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the suffix from the path string. Normally, the suffix is the substring of the basename of path from the last '.' to the end of the string. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e3760f32ad9aaad800e68917578c7220"></a><!-- doxytag: member="utils.hpp::strtol" ref="e3760f32ad9aaad800e68917578c7220" args="(const char *nptr, long &n)" --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceUtil.html#e3760f32ad9aaad800e68917578c7220">Util::strtol</a> (const char *nptr, long &n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a C string to a long value, which is returned in n. Returns true if the conversion is successful, else false. n is not modified if the conversion is unsuccessful. See strtol(2). <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ac2efa1797a1bd038485be421ca80ca3"></a><!-- doxytag: member="utils.hpp::replace" ref="ac2efa1797a1bd038485be421ca80ca3" args="(std::string &text, const std::string &searchText, const std::string &replaceText)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceUtil.html#ac2efa1797a1bd038485be421ca80ca3">Util::replace</a> (std::string &text, const std::string &searchText, const std::string &replaceText)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Replaces all occurences of <em>searchText</em> in the <em>text</em> string by <em>replaceText</em>. <br></td></tr> </table> <hr><h2>Detailed Description</h2> A collection of utility functions. <p> <dl class="version" compact><dt><b>Version:</b></dt><dd></dd></dl> <dl class="rcs" compact><dt><b>Rev</b></dt><dd>1750 </dd></dl> <dl class="author" compact><dt><b>Author:</b></dt><dd>Andreas Huggel (ahu) <a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a> </dd></dl> <dl class="date" compact><dt><b>Date:</b></dt><dd>12-Dec-03, ahu: created </dd></dl> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 25 15:17:37 2009 for Exiv2 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>