InitializationFunctions Class Reference

#include <module.h>

详细描述

An InitializationFunctions object is created by the macro MAXON_INITIALIZATION. It is a local entity definition without references or uses which invokes initialization and shutdown functions as part of the initialization and shutdown of the current translation unit. The identifier is given by the source file name and needn't be unique. There may be several InitializationFunctions objects per source file.

公共成员函数

  InitializationFunctions (const Char *file, Result < void >(*init)(), void(*free)(), TranslationUnit *unit)

Private Attributes

EntityDefinition  _super
Result < void >(*const  _init )()
void(*const  _free )()

Friends

class  maxon::ObjectModel

构造函数 & 析构函数文档编制

◆  InitializationFunctions()

InitializationFunctions ( const Char file ,
Result < void >(*)()  init ,
void(*)()  free ,
TranslationUnit *  unit  
)

Constructs the InitializationFunctions object and adds it to the definition list of the current translation unit.

参数
[in] file Name of the current source file, will be used for the entity identifier.
[in] init Initialization function, may be nullptr.
[in] free Shutdown function, may be nullptr.
[in] unit The translation unit containing the object.

Friends And Related Function Documentation

◆  maxon::ObjectModel

friend class maxon::ObjectModel friend

Member Data Documentation

◆  _super

EntityDefinition _super private

Base definition object.

◆  _init

Result <void>(* const _init()
private

Initialization function.

◆  _free

void(* const _free() private

Shutdown function.