Removed exportFileXML, and importXML, updated indra/test's

and generally updated cpp's to V-D look(include order, spelling fixes, and whatnot)
Also, commented out pointless using namespace std.
This commit is contained in:
Lirusaito
2012-07-03 10:07:14 -04:00
parent b0c28c5eb2
commit ca9c99577f
19 changed files with 211 additions and 410 deletions

View File

@@ -853,67 +853,8 @@ BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const
return TRUE;
}
LLXMLNode *LLPermissions::exportFileXML() const
{
LLXMLNode *ret = new LLXMLNode("permissions", FALSE);
ret->createChild("group_owned", TRUE)->setBoolValue(mIsGroupOwned);
ret->createChild("base_mask", FALSE)->setByteValue(4, (U8*)&mMaskBase, LLXMLNode::ENCODING_HEX);
ret->createChild("owner_mask", FALSE)->setByteValue(4, (U8*)&mMaskOwner, LLXMLNode::ENCODING_HEX);
ret->createChild("group_mask", FALSE)->setByteValue(4, (U8*)&mMaskGroup, LLXMLNode::ENCODING_HEX);
ret->createChild("everyone_mask", FALSE)->setByteValue(4, (U8*)&mMaskEveryone, LLXMLNode::ENCODING_HEX);
ret->createChild("next_owner_mask", FALSE)->setByteValue(4, (U8*)&mMaskNextOwner, LLXMLNode::ENCODING_HEX);
ret->createChild("creator_id", FALSE)->setUUIDValue(1, &mCreator);
ret->createChild("owner_id", FALSE)->setUUIDValue(1, &mOwner);
ret->createChild("last_owner_id", FALSE)->setUUIDValue(1, &mLastOwner);
ret->createChild("group_id", FALSE)->setUUIDValue(1, &mGroup);
return ret;
}
bool LLPermissions::importXML(LLXMLNode* node)
{
bool success = false;
if (node)
{
success = true;
LLXMLNodePtr sub_node;
if (node->getChild("base_mask", sub_node))
success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskBase));
if (node->getChild("owner_mask", sub_node))
success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskOwner));
if (node->getChild("group_mask", sub_node))
success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskGroup));
if (node->getChild("everyone_mask", sub_node))
success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskEveryone));
if (node->getChild("next_owner_mask", sub_node))
success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskNextOwner));
if (node->getChild("creator_id", sub_node))
success = success && (1 == sub_node->getUUIDValue(1, &mCreator));
if (node->getChild("owner_id", sub_node))
success = success && (1 == sub_node->getUUIDValue(1, &mOwner));
if (node->getChild("last_owner_id", sub_node))
success = success && (1 == sub_node->getUUIDValue(1, &mLastOwner));
if (node->getChild("group_id", sub_node))
success = success && (1 == sub_node->getUUIDValue(1, &mGroup));
if (node->getChild("group_owned", sub_node))
{
BOOL tmpbool = FALSE;
success = success && (1 == sub_node->getBoolValue(1, &tmpbool));
mIsGroupOwned = (bool)tmpbool;
}
if (!success)
{
lldebugs << "LLPermissions::importXML() failed for node named '"
<< node->getName() << "'" << llendl;
}
}
return success;
}
// Deleted LLPermissions::exportFileXML() and LLPermissions::importXML()
// because I can't find any non-test code references to it. 2009-05-04 JC
bool LLPermissions::operator==(const LLPermissions &rhs) const
{