<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>glibmm: Gio::FileAttributeMatcher Class 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.6.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceGio.html">Gio</a>::<a class="el" href="classGio_1_1FileAttributeMatcher.html">FileAttributeMatcher</a> </div> </div> <div class="contents"> <h1>Gio::FileAttributeMatcher Class Reference</h1><!-- doxytag: class="Gio::FileAttributeMatcher" --> <p><a class="el" href="classGio_1_1FileAttributeMatcher.html" title="FileAttributeMatcher allows for searching through a FileInfo for attributes.">FileAttributeMatcher</a> allows for searching through a <a class="el" href="classGio_1_1FileInfo.html" title="FileInfo implements methods for getting information that all files should contain...">FileInfo</a> for attributes. <a href="#_details">More...</a></p> <p><a href="classGio_1_1FileAttributeMatcher-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#af9f21d4f8a594676e747583cbc3ad61b">reference</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#a9e66e5a86c52725b6bd4f16781229775">unreference</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">GFileAttributeMatcher* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#a34cf74569abe9a13c4412bf8f2347747">gobj</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. <a href="#a34cf74569abe9a13c4412bf8f2347747"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const GFileAttributeMatcher* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#a5e217b69f70586991b2ef272746aa7a4">gobj</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. <a href="#a5e217b69f70586991b2ef272746aa7a4"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">GFileAttributeMatcher* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#a35f18b4eb01427687fb0fe4f74dc0316">gobj_copy</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. <a href="#a35f18b4eb01427687fb0fe4f74dc0316"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#a8e9f6798e6d368e0134ba00ca82106aa">matches</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>& full_name) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Checks if an attribute will be matched by an attribute matcher. <a href="#a8e9f6798e6d368e0134ba00ca82106aa"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#a664ac79f08935d6c13396a6d607aea84">matches_only</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>& full_name) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Checks if a attribute matcher only matches a given attribute. <a href="#a664ac79f08935d6c13396a6d607aea84"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#ac0edeabc8f07048f8bb2ba96d84983b8">enumerate_namespace</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>& ns)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Checks if the matcher will match all of the keys in a given namespace. <a href="#ac0edeabc8f07048f8bb2ba96d84983b8"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#a18103e91422814f576ff4b339bb085da">enumerate_next</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the next matched attribute from a <a class="el" href="classGio_1_1FileAttributeMatcher.html" title="FileAttributeMatcher allows for searching through a FileInfo for attributes.">FileAttributeMatcher</a>. <a href="#a18103e91422814f576ff4b339bb085da"></a><br/></td></tr> <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><br class="typebreak"/> < <a class="el" href="classGio_1_1FileAttributeMatcher.html">FileAttributeMatcher</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#a47b85316b6b6ce30841895ae6ef4f498">create</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>& attributes="*")</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new file attribute matcher, which matches attributes against a given string. <a href="#a47b85316b6b6ce30841895ae6ef4f498"></a><br/></td></tr> <tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#ae91e6b65ca5bb2c635f5bdf9cba56ed7">FileAttributeMatcher</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#a51a9c2dc02b96c5d902988c4a2a1bdae">operator delete</a> (void*, size_t)</td></tr> <tr><td colspan="2"><h2>Related Functions</h2></td></tr> <tr><td colspan="2"><p>(Note that these are not member functions.) </p> <br/><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><br class="typebreak"/> < <a class="el" href="classGio_1_1FileAttributeMatcher.html">Gio::FileAttributeMatcher</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileAttributeMatcher.html#a55c8ef1a5445afd09cc530d7c4945b7b">wrap</a> (GFileAttributeMatcher* object, bool take_copy=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="el" href="namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#a55c8ef1a5445afd09cc530d7c4945b7b"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p><a class="el" href="classGio_1_1FileAttributeMatcher.html" title="FileAttributeMatcher allows for searching through a FileInfo for attributes.">FileAttributeMatcher</a> allows for searching through a <a class="el" href="classGio_1_1FileInfo.html" title="FileInfo implements methods for getting information that all files should contain...">FileInfo</a> for attributes. </p> <dl class="since_2_16"><dt><b><a class="el" href="since_2_16.html#_since_2_16000028">Since glibmm 2.16:</a></b></dt><dd></dd></dl> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="ae91e6b65ca5bb2c635f5bdf9cba56ed7"></a><!-- doxytag: member="Gio::FileAttributeMatcher::FileAttributeMatcher" ref="ae91e6b65ca5bb2c635f5bdf9cba56ed7" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gio::FileAttributeMatcher::FileAttributeMatcher </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a47b85316b6b6ce30841895ae6ef4f498"></a><!-- doxytag: member="Gio::FileAttributeMatcher::create" ref="a47b85316b6b6ce30841895ae6ef4f498" args="(const std::string &attributes="*")" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1FileAttributeMatcher.html">FileAttributeMatcher</a>> Gio::FileAttributeMatcher::create </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> & </td> <td class="paramname"> <em>attributes</em> = <code>"*"</code></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new file attribute matcher, which matches attributes against a given string. </p> <p>The attribute string should be formatted with specific keys separated from namespaces with a double colon. Several "namespace::key" strings may be concatenated with a single comma (e.g. "standard::type,standard::is-hidden"). The wildcard "*" may be used to match all keys and namespaces, or "namespace::*" will match all keys in a given namespace.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>attributes</em> </td><td>The attributes string. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>a new <a class="el" href="classGio_1_1FileAttributeMatcher.html" title="FileAttributeMatcher allows for searching through a FileInfo for attributes.">FileAttributeMatcher</a>. </dd></dl> </div> </div> <a class="anchor" id="ac0edeabc8f07048f8bb2ba96d84983b8"></a><!-- doxytag: member="Gio::FileAttributeMatcher::enumerate_namespace" ref="ac0edeabc8f07048f8bb2ba96d84983b8" args="(const std::string &ns)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gio::FileAttributeMatcher::enumerate_namespace </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> & </td> <td class="paramname"> <em>ns</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Checks if the matcher will match all of the keys in a given namespace. </p> <p>This will always return <code>true</code> if a wildcard character is in use (e.g. if matcher was created with "standard::*" and <em>ns</em> is "standard", or if matcher was created using "*" and namespace is anything.)</p> <p>TODO: this is awkwardly worded. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>ns</em> </td><td>A string containing a file attribute namespace. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the matcher matches all of the entries in the given <em>ns</em>, <code>false</code> otherwise. </dd></dl> </div> </div> <a class="anchor" id="a18103e91422814f576ff4b339bb085da"></a><!-- doxytag: member="Gio::FileAttributeMatcher::enumerate_next" ref="a18103e91422814f576ff4b339bb085da" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Gio::FileAttributeMatcher::enumerate_next </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the next matched attribute from a <a class="el" href="classGio_1_1FileAttributeMatcher.html" title="FileAttributeMatcher allows for searching through a FileInfo for attributes.">FileAttributeMatcher</a>. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>A string containing the next attribute or <code>0</code> if no more attribute exist. </dd></dl> </div> </div> <a class="anchor" id="a5e217b69f70586991b2ef272746aa7a4"></a><!-- doxytag: member="Gio::FileAttributeMatcher::gobj" ref="a5e217b69f70586991b2ef272746aa7a4" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const GFileAttributeMatcher* Gio::FileAttributeMatcher::gobj </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C instance. </p> </div> </div> <a class="anchor" id="a34cf74569abe9a13c4412bf8f2347747"></a><!-- doxytag: member="Gio::FileAttributeMatcher::gobj" ref="a34cf74569abe9a13c4412bf8f2347747" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GFileAttributeMatcher* Gio::FileAttributeMatcher::gobj </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C instance. </p> </div> </div> <a class="anchor" id="a35f18b4eb01427687fb0fe4f74dc0316"></a><!-- doxytag: member="Gio::FileAttributeMatcher::gobj_copy" ref="a35f18b4eb01427687fb0fe4f74dc0316" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GFileAttributeMatcher* Gio::FileAttributeMatcher::gobj_copy </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. </p> </div> </div> <a class="anchor" id="a8e9f6798e6d368e0134ba00ca82106aa"></a><!-- doxytag: member="Gio::FileAttributeMatcher::matches" ref="a8e9f6798e6d368e0134ba00ca82106aa" args="(const std::string &full_name) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gio::FileAttributeMatcher::matches </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> & </td> <td class="paramname"> <em>full_name</em></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Checks if an attribute will be matched by an attribute matcher. </p> <p>If the matcher was created with the "*" matching string, this function will always return <code>true</code>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>attribute</em> </td><td>A file attribute key. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if <em>attribute</em> matches <em>matcher</em>. <code>false</code> otherwise. </dd></dl> </div> </div> <a class="anchor" id="a664ac79f08935d6c13396a6d607aea84"></a><!-- doxytag: member="Gio::FileAttributeMatcher::matches_only" ref="a664ac79f08935d6c13396a6d607aea84" args="(const std::string &full_name) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gio::FileAttributeMatcher::matches_only </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> & </td> <td class="paramname"> <em>full_name</em></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Checks if a attribute matcher only matches a given attribute. </p> <p>Always Returns: <code>true</code> if the matcher only matches <em>attribute</em>. <code>false</code> otherwise. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>attribute</em> </td><td>A file attribute key. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the matcher only matches <em>attribute</em>. <code>false</code> otherwise. </dd></dl> </div> </div> <a class="anchor" id="a51a9c2dc02b96c5d902988c4a2a1bdae"></a><!-- doxytag: member="Gio::FileAttributeMatcher::operator delete" ref="a51a9c2dc02b96c5d902988c4a2a1bdae" args="(void *, size_t)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gio::FileAttributeMatcher::operator delete </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname">, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="af9f21d4f8a594676e747583cbc3ad61b"></a><!-- doxytag: member="Gio::FileAttributeMatcher::reference" ref="af9f21d4f8a594676e747583cbc3ad61b" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gio::FileAttributeMatcher::reference </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a9e66e5a86c52725b6bd4f16781229775"></a><!-- doxytag: member="Gio::FileAttributeMatcher::unreference" ref="a9e66e5a86c52725b6bd4f16781229775" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gio::FileAttributeMatcher::unreference </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Friends And Related Function Documentation</h2> <a class="anchor" id="a55c8ef1a5445afd09cc530d7c4945b7b"></a><!-- doxytag: member="Gio::FileAttributeMatcher::wrap" ref="a55c8ef1a5445afd09cc530d7c4945b7b" args="(GFileAttributeMatcher *object, bool take_copy=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1FileAttributeMatcher.html">Gio::FileAttributeMatcher</a> > wrap </td> <td>(</td> <td class="paramtype">GFileAttributeMatcher * </td> <td class="paramname"> <em>object</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>take_copy</em> = <code>false</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [related]</code></td> </tr> </table> </div> <div class="memdoc"> <p>A <a class="el" href="namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>object</em> </td><td>The C instance. </td></tr> <tr><td valign="top"></td><td valign="top"><em>take_copy</em> </td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>giomm/fileinfo.h</li> </ul> </div> <hr size="1"/><address style="text-align: right;"><small>Generated on Mon Sep 21 11:07:22 2009 for glibmm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>