Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

uniconf_c.cc

Go to the documentation of this file.
00001 /*
00002  * Worldvisions Weaver Software:
00003  *   Copyright (C) 1997-2002 Net Integration Technologies, Inc.
00004  * 
00005  * Provides a C binding for UniConf.
00006  */
00007 #include "uniconf.h"
00008 #include "uniconfroot.h"
00009 
00010 
00011 uniconf_t uniconf_init(const char* _moniker)
00012 {
00013     return new UniConfRoot(_moniker);
00014 }
00015 
00016 
00017 void uniconf_free(uniconf_t _uniconf)
00018 {
00019     assert(_uniconf);
00020 
00021     delete static_cast<UniConfRoot*>(_uniconf);
00022 }
00023 
00024 
00025 const char* uniconf_get(uniconf_t _uniconf, const char* _key)
00026 {
00027     UniConfRoot* uniconf = static_cast<UniConfRoot*>(_uniconf);
00028 
00029     return strdup((*uniconf)[WvString(_key)].get());
00030 }
00031 
00032 
00033 void uniconf_set(uniconf_t _uniconf,
00034                  const char* _key, const char* _value)
00035 {
00036     UniConfRoot* uniconf = static_cast<UniConfRoot*>(_uniconf);
00037 
00038     return (*uniconf)[_key].set(_value);
00039 }
00040 

Generated on Sat Mar 13 14:55:19 2004 for WvStreams by doxygen 1.3.6-20040222