<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Add const keyword to Get methods on class interfaces in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/add-const-keyword-to-get-methods-on-class/m-p/425442#M711</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have added the const keyword to most Get functions in the 1.1 version of the API. This should allow the writing of more robust code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Aug 2011 15:22:24 GMT</pubDate>
    <dc:creator>LanceShipman</dc:creator>
    <dc:date>2011-08-15T15:22:24Z</dc:date>
    <item>
      <title>Add const keyword to Get methods on class interfaces</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/add-const-keyword-to-get-methods-on-class/m-p/425441#M710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Without the const keyword attached to get methods you cannot create any const references to fGDB types.&amp;nbsp; Example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void func(const Geodatabase *pGdb)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; pGdb-&amp;gt;GetDatasetTypes(...);&amp;nbsp; // Error&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void func2(const Geodatabase &amp;amp;gdb)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; gdb.GetDatasetTypes(...); // Error&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This prevents us from writing more robust code that is self documenting (const indicating that we will not mutate the state of the object within the code).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Were these attributes omitted because the internal implementation of the fGDB classes do mutate state from the invocation of such methods?&amp;nbsp; If so does applying mutable to the offending fields resolve any of these internal issues?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2011 18:41:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/add-const-keyword-to-get-methods-on-class/m-p/425441#M710</guid>
      <dc:creator>MichaelSzaszy</dc:creator>
      <dc:date>2011-04-25T18:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Add const keyword to Get methods on class interfaces</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/add-const-keyword-to-get-methods-on-class/m-p/425442#M711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have added the const keyword to most Get functions in the 1.1 version of the API. This should allow the writing of more robust code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2011 15:22:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/add-const-keyword-to-get-methods-on-class/m-p/425442#M711</guid>
      <dc:creator>LanceShipman</dc:creator>
      <dc:date>2011-08-15T15:22:24Z</dc:date>
    </item>
  </channel>
</rss>

