Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
OSThreadOnce Class Reference

This class provides support for one time initialization. More...

#include <OS.hxx>

Public Member Functions

 OSThreadOnce (void(*routine)(void))
 One time intialization constructor.
 
int once (void)
 call one time intialization routine
 
 ~OSThreadOnce ()
 Default Destructor.
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (OSThreadOnce)
 

Private Attributes

os_thread_once_t handle
 Private once handle.
 
void(* routine )(void)
 One time initialization routine.
 

Detailed Description

This class provides support for one time initialization.

Definition at line 205 of file OS.hxx.

Constructor & Destructor Documentation

◆ OSThreadOnce()

OSThreadOnce::OSThreadOnce ( void(*)(void)  routine)
inline

One time intialization constructor.

Parameters
routinemethod to call once

Definition at line 211 of file OS.hxx.

◆ ~OSThreadOnce()

OSThreadOnce::~OSThreadOnce ( )
inline

Default Destructor.

Definition at line 226 of file OS.hxx.

Member Function Documentation

◆ once()

int OSThreadOnce::once ( void  )
inline

call one time intialization routine

Returns
0 upon success

Definition at line 220 of file OS.hxx.

Member Data Documentation

◆ handle

os_thread_once_t OSThreadOnce::handle
private

Private once handle.

Definition at line 234 of file OS.hxx.

◆ routine

void(* OSThreadOnce::routine) (void)
private

One time initialization routine.

Definition at line 237 of file OS.hxx.


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