umbrello: ClientInfo_POD Struct Reference

umbrello 2.38.5 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Topics
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Attributes | List of all members
ClientInfo_POD Struct Reference

## 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:

- umbrello/debug/debug_utils.cpp