On Tuesday, 19 May 2015 at 17:44:38 UTC, CraigDillabaugh wrote:
Just to clarify then. If gdalwarper.h includes gdal.h and GDALDatasetH is declared in gdal.h, then gdal.h gets imported too?


On Tuesday, 19 May 2015 at 19:57:45 UTC, Suliman wrote:
How do you understand which files should be imported?

+1 for question!

modmap is only telling Clang which headers to parse. Then all those headers form a big monolithic AST that Calypso split into modules following a few rules:

import (C++) namespace1.testStruct; // imports namespace1::testStruct import (C++) namespace2.testClass; // imports namespace2::testClass import (C++) test.anotherClass; // etc. each struct/class/enum template or not is placed in a module named after it import (C++) test.tempWithPartialSpecs; // imports the primary class template + all its partial and explicit specializations import (C++) test._; // « _ » is a special module that contains all the global variables, global functions and typedefs of a namespace (the ones which aren't nested inside a struct or a class, or another namespace).

Why the header paths can't be used in imports is explained here:


Documentation is scarce at the moment, the examples (starting with showcase.d) try to give a quick overview of how to use Calypso but yep we really should write a tutorial of some sort, either I or Kelly will do it before DConf.

Reply via email to