/* Copyright (C) 2008 John Hobbs - john@velvetcache.org This file is part of libvcconfig. libvcconfig is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. libvcconfig is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with libvcconfig. If not, see . */ #include #include using namespace std; int main(int argc, char *argv[]) { vcConfig config; cout << "Dump To String: " << endl << config.toString() << endl; config.set("hello",string("world")); cout << "Dump To String: " << endl << config.toString() << endl; config.set("hello",string("hi")); cout << "Dump To String: " << endl << config.toString() << endl; config.set("hello",true); cout << "Dump To String: " << endl << config.toString() << endl; cout << "Hello is? " << ((config.getBool("hello")) ? "true" : "false") << endl; cout << "Empty is? " << ((config.getBool("empty")) ? "true" : "false") << endl; vcConfig copyOp; copyOp.set("overWriteMe",string("DoIt!")); cout << "Dump To String: " << endl << copyOp.toString() << endl; copyOp = config; cout << "Dump To String: " << endl << copyOp.toString() << endl; }