<div dir="ltr">Even,<div><br></div><div>If a format can have a combination of point, lines, and polygons in a layer, should the layer class set wkbGeometryCollection?  And if so, does that imply Z is okay or not okay?  I see there is also wkbGeometryCollectionM and wkbGeometryCollectionZM, but no wkbGeometryCollectionZ.  And I see wkbGeometryCollection25D is old and shouldn't be used, yes?</div><div><br></div><div>poFeatureDefn->SetGeomType(wkbGeometryCollection);<br></div><div><br></div><div>Thanks!</div><div>-kurt</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 16, 2017 at 7:10 AM, Kurt Schwehr <span dir="ltr"><<a href="mailto:schwehr@gmail.com" target="_blank">schwehr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Mateusz,<br><div><br></div><div>I have been meaning to write up a new RFC for the switch to C++11 as a minimum in January and then the flu caught up with me.  I will try to do that in the next week or two.   And I really appreciate all folks who commented on that thread.</div><div><br></div><div>In my opinion, RFC 8 could use a lot of things and I only got through 2 documents that could feed into it last year (if I remember correctly).  One of which was about getting large buffers off of the stack (<a href="http://goo.gl/vuA3D6" target="_blank">http://goo.gl/vuA3D6</a>).  The other was a start on int bFoo -> bool bFoo (<a href="https://goo.gl/hdzhXD" target="_blank">https://goo.gl/hdzhXD</a></div><div><br></div><div>Things that I think should be discussed/added off the top of my head in no particular order and only things before C++11.  And I just overwhelmed myself.</div><div><br></div><div>- When to use bool/true/false versus int/TRUE/FALSE/-1(MAYBE/<wbr>UNKNOWN?).  Expand on <a href="https://goo.gl/hdzhXD" target="_blank">https://goo.gl/hdzhXD</a></div><div>- namespaces</div><div>- IWYU</div><div>- Initializing vars and data members.  ctor initializer lists</div><div>- Don't use goto</div><div>- Templates and inlining</div><div>- Defining one member per line</div><div>- clang-format</div><div>- C++ casting</div><div>- CPLString versus std::string</div><div>- Preferring const var to #define</div><div>- Making vars const when possible</div><div>- override, explicit, CPL_DISALLOW_COPY_<wbr>ASSIGN</div><div>- Design for testability and what tests to have.  e.g. I am working on an in depth test of jp2kakdataset.cpp.</div><div>- static and dynamic analysis.  cppcheck, clang static analyzier, compiler warnings.  How and when to tell the tools that they are being dumb</div><div>- Examples of good/helpful comments</div><div>- What to do about svn keywords and file permissions (e.g. python tests and shellscripts being executable)</div><div>- When to use parens</div><div>- Prefer !.empty() and .empty().  When to use CPL_ARRAYSIZE</div><div>- Don't convert back to C strings for operations that are available in a C++ string you already have</div><div>- ABS/MIN/MAX -> std::abs/std::min/std::max etc.</div><div>- When to use {} in if else (at least be consistent within a block)</div><div>- When to use a scope</div><div>- char *foo v. char foo[]</div><div>- When is it okay to have newlines in CPLDebug and CPLError</div><div>- When to use #if DEBUG_VERBOSE.  Is it okay to check in commented out code?</div><div><br></div><div>After C++11:</div><div><br></div><div>- Avoid bare .*alloc/new and *free/delete</div><div>- NULL -> nullptr</div><div>- constexpr / static_assert</div><div>- std::initializer_list</div><div><br></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Thu, Feb 16, 2017 at 1:16 AM, Mateusz Loskot <span dir="ltr"><<a href="mailto:mateusz@loskot.net" target="_blank">mateusz@loskot.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 15 February 2017 at 17:27, Kurt Schwehr <<a href="mailto:schwehr@gmail.com" target="_blank">schwehr@gmail.com</a>> wrote:<br>
><br>
> Thanks for the pointers.  I will do touchups on the driver tutorial as I go.<br>
</span>> [...]<br>
<span>> What's the cleanest way to setup the driver registration?<br>
><br>
> Should I be deriving from GDALDataset?<br>
<br>
</span>Kurt,<br>
<br>
BTW, I'd have similar or related question.<br>
<br>
Which driver or part of the code is the latest/greatest in<br>
terms of the new C++ programming guidelines to look up to<br>
while writing new code for GDAL?<br>
<br>
Has there been any agreement on the overall C++ coding guidelines?<br>
Better, do we need the RFC8 [1] update?<br>
<br>
[1] <a href="https://trac.osgeo.org/gdal/wiki/rfc8_devguide" rel="noreferrer" target="_blank">https://trac.osgeo.org/gdal/wi<wbr>ki/rfc8_devguide</a><br>
<br>
Best regards<br>
<span class="m_3591065464197337044HOEnZb"><font color="#888888">--<br>
Mateusz Loskot, <a href="http://mateusz.loskot.net" rel="noreferrer" target="_blank">http://mateusz.loskot.net</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_3591065464197337044gmail_signature" data-smartmail="gmail_signature">--<div><a href="http://schwehr.org" target="_blank">http://schwehr.org</a></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--<div><a href="http://schwehr.org" target="_blank">http://schwehr.org</a></div></div>
</div>