SourceCityHeader

SourceCity

Requirements

  • Inherit of SourceCityAbstractStrategy
  • Respect and take for example some already existing strategy like SourceCityImporterRPackageStrategy, SourceCityImporterPackageInfoStrategy or SourceCityImporterDefaultStrategy

Exemple with RPackage

In this part we will explain to you the most important things for build your own strategy. Most of functions have an explicit name, so that's the reason we explain only some of them.

districtsSelector

^ [:anObject | anObject].

A district will be represented by an element of what you pass to the importer.

buildingsSelector

^ [:anObject | (RPackageOrganizer default packageNamed: anObject ) classes].

A building will be represented by a class of disrtict

districtNameGenerator

^ [:anObject | RPackageOrganizer default packageNamed: anObject]

This function return a block that define the district name. There is the same function for buildings.

heightSelector

^ [:anObject | (anObject selectors size)]

This block defines how the height of each buildings will be set

districtGap

^ 2

It's the gap between each district. You get the same thing for buildings