cconfigreader.h

00001 //==========================================================================
00002 //  CCONFIGREADER.H - part of
00003 //                     OMNeT++/OMNEST
00004 //            Discrete System Simulation in C++
00005 //
00006 //==========================================================================
00007 
00008 /*--------------------------------------------------------------*
00009   Copyright (C) 1992-2008 Andras Varga
00010   Copyright (C) 2006-2008 OpenSim Ltd.
00011 
00012   This file is distributed WITHOUT ANY WARRANTY. See the file
00013   `license' for details on this and other legal matters.
00014 *--------------------------------------------------------------*/
00015 
00016 #ifndef __CCONFIGREADER_H
00017 #define __CCONFIGREADER_H
00018 
00019 #include "simkerneldefs.h"
00020 
00021 NAMESPACE_BEGIN 
00022 
00023 class cConfiguration;
00024 
00033 class cConfigurationReader
00034 {
00035   public:
00039     class KeyValue {
00040       public:
00041         virtual ~KeyValue() {}
00042         virtual const char *getKey() const = 0;
00043         virtual const char *getValue() const = 0;
00044         virtual const char *getBaseDirectory() const = 0;
00045         virtual const char *getFileName() const = 0;
00046         virtual int getLineNumber() const = 0;
00047     };
00048 
00049   public:
00053     virtual ~cConfigurationReader() {}
00054 
00061     virtual void initializeFrom(cConfiguration *bootConfig) = 0;
00062 
00067     virtual const char *getFileName() const = 0;
00068 
00075     virtual const char *getDefaultBaseDirectory() const = 0;
00076 
00080     virtual int getNumSections() const = 0;
00081 
00086     virtual const char *getSectionName(int sectionId) const = 0;
00087 
00092     virtual int getNumEntries(int sectionId) const = 0;
00093 
00099     virtual const KeyValue& getEntry(int sectionId, int entryId) const = 0;
00100 
00105     virtual void dump() const = 0;
00106 };
00107 
00108 NAMESPACE_END
00109 
00110 #endif
00111 
00112 
Generated on Tue Dec 2 11:16:27 2014 for OMNeT++ Simulation Library by  doxygen 1.6.3