m_autosave = true;
}
+obResource::obResource() {
+ m_modified = false;
+ m_database = NULL;
+ m_autosave = true;
+}
+
obResource::~obResource() {
if (m_database != NULL)
XrmDestroyDatabase(m_database);
void obResource::setFile(const std::string &file) {
m_file = file;
- assert(m_file.c_str() != NULL);
}
void obResource::setAutoSave(bool autosave) {
bool obResource::getValue(const std::string &rname, const std::string &rclass,
bool &value) const {
- assert(rname.c_str() != NULL);
assert(rclass.c_str() != NULL);
assert(m_database != NULL);
&rettype, &retvalue) || retvalue.addr == NULL)
return false;
std::string val = retvalue.addr;
- if (val == "True")
+ if (0 == strncasecmp(val.c_str(), "true", val.length()))
value = true;
else
value = false;
bool obResource::getValue(const std::string &rname, const std::string &rclass,
long &value) const {
- assert(rname.c_str() != NULL);
- assert(rclass.c_str() != NULL);
assert(m_database != NULL);
char *rettype;
bool obResource::getValue(const std::string &rname, const std::string &rclass,
std::string &value) const {
- assert(rname.c_str() != NULL);
- assert(rclass.c_str() != NULL);
assert(m_database != NULL);
char *rettype;