Beamlib  3.0.1
This is the Beam C++ class library.
BConfig.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * BConfig.h Config File Access
3  * T.Barnaby, BEAM Ltd, 2009-01-28
4  * Copyright (c) 2012 All Right Reserved, Beam Ltd, http://www.beam.ltd.uk
5  *******************************************************************************
6  *
7  * For license see LICENSE.txt at the root of the beamlib source tree.
8  */
9 #ifndef BConfig_H
10 #define BConfig_H
11 
12 #include <BDict.h>
13 #include <BFile.h>
14 #include <BMutex.h>
15 
17 class BConfig : public BDictString {
18 public:
19  BError open(BString fileName, BString mode = "r");
20  void close();
21  BError read();
22  BError write();
23 
25  BString fileName();
26 
27 private:
28  BMutex olock;
29  BString ofileName;
30  BFile ofile;
31 };
32 #endif
This class implements the configuration file access.
Definition: BConfig.h:17
BError read()
Definition: BConfig.cpp:22
BError open(BString fileName, BString mode="r")
Definition: BConfig.cpp:11
BError write()
Definition: BConfig.cpp:60
BString findValue(BString name)
Definition: BConfig.cpp:78
void close()
Definition: BConfig.cpp:17
BString fileName()
Definition: BConfig.cpp:83
Dictionary list class using templates.
Definition: BDict.h:24
Error return class. This class is used to return the error status from a function....
Definition: BError.h:31
File operations class.
Definition: BFile.h:17
Mutex class. Note these are recursive Mutexes and so you need to make sure the number of unlocks equa...
Definition: BMutex.h:14
This class stores and manipulates ASCII strings.
Definition: BString.h:20