#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "helper.h"
#include "Properties.h"
Include dependency graph for Properties.c:
Go to the source code of this file.
Functions | |
static char * | getString (Properties *props, char *key, char *defaultValue) |
See header Properties.h for documentation. | |
static int | getBool (Properties *props, char *key, int defaultValue) |
static int | getInt (Properties *props, char *key, int defaultValue) |
static long | getLong (Properties *props, char *key, long defaultValue) |
static int64_t | getInt64 (Properties *props, char *key, int64_t defaultValue) |
Properties * | createProperties (int argc, char **argv) |
Create an instance of a property struct. | |
void | freeProperties (Properties *props) |
Free your instance after accessing xmlBlaster. | |
void | dumpProperties (Properties *props) |
Dump properties to console, for debugging only. |
Properties* createProperties | ( | int | argc, | |
char ** | argv | |||
) |
Create an instance of a property struct.
NOTE: Our properties point on the passed argv memory, so you should not free the original argv memory.
argc | The number of command line args | |
argv | The command line arguments, argv[0] is expected to be the name of the process, argv[1] should start with '-' and argv[2] is the value of the argv[1] key ... argv can be NULL if argc == 0 |
Definition at line 35 of file Properties.c.
References PropertiesStruct::argc, PropertiesStruct::argv, PropertiesStruct::execName, getBool(), PropertiesStruct::getBool, getInt(), PropertiesStruct::getInt, getInt64(), PropertiesStruct::getInt64, getLong(), PropertiesStruct::getLong, getString(), and PropertiesStruct::getString.
Referenced by getCallbackServerUnparsed(), getXmlBlasterAccessUnparsed(), and getXmlBlasterConnectionUnparsed().
Here is the call graph for this function:
void dumpProperties | ( | Properties * | props | ) |
Dump properties to console, for debugging only.
Definition at line 78 of file Properties.c.
References PropertiesStruct::argc, and PropertiesStruct::argv.
void freeProperties | ( | Properties * | props | ) |
Free your instance after accessing xmlBlaster.
Definition at line 63 of file Properties.c.
References PropertiesStruct::argc, and PropertiesStruct::argv.
Referenced by freeCallbackServerUnparsed(), freeXmlBlasterAccessUnparsed(), and freeXmlBlasterConnectionUnparsed().
static int getBool | ( | Properties * | props, | |
char * | key, | |||
int | defaultValue | |||
) | [static] |
Definition at line 134 of file Properties.c.
References getString().
Referenced by createProperties().
Here is the call graph for this function:
static int getInt | ( | Properties * | props, | |
char * | key, | |||
int | defaultValue | |||
) | [static] |
Definition at line 146 of file Properties.c.
References getLong().
Referenced by createProperties().
Here is the call graph for this function:
static int64_t getInt64 | ( | Properties * | props, | |
char * | key, | |||
int64_t | defaultValue | |||
) | [static] |
Definition at line 162 of file Properties.c.
References getString(), and strToInt64().
Referenced by createProperties().
Here is the call graph for this function:
static long getLong | ( | Properties * | props, | |
char * | key, | |||
long | defaultValue | |||
) | [static] |
Definition at line 151 of file Properties.c.
References getString(), and strToLong().
Referenced by createProperties(), and getInt().
Here is the call graph for this function:
static char * getString | ( | Properties * | props, | |
char * | key, | |||
char * | defaultValue | |||
) | [static] |
See header Properties.h for documentation.
Definition at line 92 of file Properties.c.
References PropertiesStruct::argc, and PropertiesStruct::argv.
Referenced by createProperties(), getBool(), getInt64(), and getLong().