# CPPStandaloneCodeObject class

(Shortest import: `from brian2.devices.cpp_standalone import CPPStandaloneCodeObject)`

class brian2.devices.cpp_standalone.codeobject.CPPStandaloneCodeObject(*args, **kw)

  Bases: `CodeObject`

  C++ standalone code object

  The `code` should be a `MultiTemplate` object with two macros defined, `main` (for the main loop code) and `support_code` for any support code (e.g. function definitions).

  Attributes

  `before_after_blocks` | Store whether this code object defines before/after blocks

  Methods

  `__call__`(**kwds) | Call self as a function.
  `compile_block`(block) |
  `run_block`(block) |

  Details

  before_after_blocks

    Store whether this code object defines before/after blocks

  __call__(**kwds)

    Call self as a function.

  compile_block(block)
  run_block(block)