Settings.cpp revision 62ce496afaf36bcde8d08da57a9444739d67f426
887dfcedd826364b6159847dbd25800c0eeede4avboxsync * Settings File Manipulation API.
887dfcedd826364b6159847dbd25800c0eeede4avboxsync * Copyright (C) 2007 Sun Microsystems, Inc.
887dfcedd826364b6159847dbd25800c0eeede4avboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * available from http://www.virtualbox.org. This file is free software;
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * you can redistribute it and/or modify it under the terms of the GNU
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * General Public License (GPL) as published by the Free Software
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
887dfcedd826364b6159847dbd25800c0eeede4avboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
887dfcedd826364b6159847dbd25800c0eeede4avboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
887dfcedd826364b6159847dbd25800c0eeede4avboxsync * additional information or have any questions.
887dfcedd826364b6159847dbd25800c0eeede4avboxsync// #include <string.h>
e465512ca00838f2eee92814ee935296396cd2d3vboxsync////////////////////////////////////////////////////////////////////////////////
e465512ca00838f2eee92814ee935296396cd2d3vboxsync throw ENoConversion(com::Utf8StrFmt("'%c' (0x%02X) is not hex", aChar, aChar));
e465512ca00838f2eee92814ee935296396cd2d3vboxsync return (aDigit < 0xA) ? aDigit + '0' : aDigit - 0xA + 'A';
887dfcedd826364b6159847dbd25800c0eeede4avboxsync//////////////////////////////////////////////////////////////////////////////
887dfcedd826364b6159847dbd25800c0eeede4avboxsync// string -> type conversions
887dfcedd826364b6159847dbd25800c0eeede4avboxsync//////////////////////////////////////////////////////////////////////////////
e465512ca00838f2eee92814ee935296396cd2d3vboxsyncuint64_t FromStringInteger (const char *aValue, bool aSigned,
if (aSigned)
return result;
throw ENoValue();
throw ENoValue();
return timeSpec;
throw ENoValue();
return result;
if (aSigned)
switch (aBits)
return result;
return result;
return result;
return result;
~XmlKeyBackend();
const char *name() const;
void zap();
friend class XmlTreeBackend;
if (!mNode)
return NULL;
if (!mNodeText)
return (char *) mNodeText;
if (!attr)
return NULL;
return NULL;
if (!mNode)
if (rc != 0)
if (!mNode)
return list;
return list;
if (!mNode)
return key;
return key;
if (!mNode)
return Key();
if (!mNode)
char *oldVersion;
struct IOCtxt
bool deleteStreamOnClose;
: m (new Data())
reset();
return m->oldVersion;
sThat = this;
m->autoConverter->
&oldVersion))
NULL, 0);
delete xsltInput;
while (m->autoConverter->
NULL));
bool valid = false;
&errorStr);
if (!valid)
if (validCtxt)
if (schema)
if (schemaCtxt)
reset();
xmlSaveNoEmptyTags = 0;
if (m->doc)
return m->root;
delete ctxt;
-- newMsgLen;
if (newMsgLen > 0)
const char *aID,
return NULL;
if (bufPtr)
return inputPtr;
if (bufPtr)
delete input;
delete ctxt;
catch (const xml::EIPRTFailure &err) { sThat->m->trappedErr.reset (stdx::new_exception_trap (err)); }
catch (...) { sThat->m->trappedErr.reset (stdx::new_exception_trap (xml::LogicError (RT_SRC_POS))); }
return NULL;