Skip to content
This repository was archived by the owner on Aug 30, 2019. It is now read-only.

Configuration macros

pashields edited this page Oct 14, 2012 · 1 revision

ClassMapper defines a few macros that allow you to configure behaviors at compile time.

Logging options

  • LOG_KEY_MISSING - If set to YES, ClassMapper will print a log message anytime a key is encountered in a source object, but not in the class the object deserialized into. These additional key/value pairs will always be ignored.
  • LOG_UNREADABLE_KEY - If set to YES, ClassMapper will print a log message anytime a class property is encountered that does not have a type ClassMapper can understand. ClassMapper will still usually "do the right thing", but if you are dealing with a tricky deserialize issue, this can be valuable.
  • LOG_ID_OBJ If set to YES, ClassMapper will print a log message anytime a class property is of type id. In this case ClassMapper will not attempt to deserialize the value being put into a property, but instead will move the data directly from the source object to destination class. You only want this if you explicitly want to keep a particular property in it's serialized state.

Concurrency options

  • RUN_CONCURRENT - If set to 0, ClassMapper will never use multiple threads concurrently. You probably want the concurrency, as it outperforms sequential on most datasets.

Clone this wiki locally