[Previous] [Contents] [Index] [Next]

PxConfigWriteBool()

Write a Boolean parameter in a configuration file

Synopsis:

#include <photon/PxProto.h>

int PxConfigWriteBool( const char *section, 
                       const char *entry, 
                       int format, 
                       int value );

Description:

PxConfigWriteBool() writes a Boolean parameter in the specified section and entry of the configuration file. If section is NULL, the parameter is written in the specified entry in the current section. If the parameter value was present in the file, it's overwritten with its new value; otherwise, it's added to the end of the section.


Note:
  • The configuration file must have been opened by PxConfigOpen() with a mode of PXCONFIG_WRITE.
  • If the specified section doesn't exist, it's created.
  • To create an empty section, call PxConfigForceEmptySection().

The format parameter determines how the value is formatted:

Format Output
PXCONFIG_FMT_BOOL_ON OFF or ON
PXCONFIG_FMT_BOOL_YES NO or YES
PXCONFIG_FMT_BOOL_TRUE FALSE or TRUE

Returns:

Pt_TRUE if the entry is written, otherwise Pt_FALSE

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PxConfigOpen(), PxConfigReadBool(), PxConfigReadChar(), PxConfigReadInt(), PxConfigReadLong(), PxConfigReadShort(), PxConfigReadString(), PxConfigWriteChar(), PxConfigWriteInt(), PxConfigWriteLong(), PxConfigWriteShort(), PxConfigWriteString()


[Previous] [Contents] [Index] [Next]