umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Public Attributes | List of all members
ClientInfo_POD Struct Reference
Collaboration diagram for ClientInfo_POD:

Public Attributes

const char * name
 
bool state
 
const char * filePath
 

Detailed Description

The client info filled by registerClass() needs to be Plain Old Data (not requiring a constructor) as opposed to C++ class with complex constructor because registerClass() is called very early in program execution, in the "static initialization". The static initialization is done before the main program starts executing. The compiler/linker determines the order in which static data are initialized, and the compiler/linker chosen order may not coincide with the programmer's expectation. If a global or static object of a class has a constructor in which methods of other global/static class objects are called then these calls can easily result in crash. It cannot be naively assumed that the other objects have already been constructed at the time of the call because the compiler/linker may have chosen a contrary ordering whereby their static initialization is done afterwards. Concrete examples of such crashes are given in the source.

Member Data Documentation

◆ filePath

const char* ClientInfo_POD::filePath

◆ name

const char* ClientInfo_POD::name

◆ state

bool ClientInfo_POD::state

The documentation for this struct was generated from the following file: