std::string ViewProperties::ToRaw (BTreeData *p)
{
std::stringstream ss;
- uint size = p->Size (), i;
- uchar *arr = p->ToArray ();
+ uint size = 0, i;
+ uchar *arr = NULL;
+ if (p->GetKey ()) {
+ arr = p->GetKey ()->ToRaw (size);
+ }
for (i=0; i < size; i++) {
- if (isalnum (arr[i]))
+ if (isalnum (arr[i]) || (arr[i] == ']') || (arr[i] == '|') ||
+ (arr[i] == '[') || (arr[i] == '-'))
ss << arr[i];
else
ss << ".";
}
- delete [] arr;
+ if (p->GetChild () != 0) {
+ ss << "(";
+ ss << p->GetChild ();
+ ss << ")";
+ }
+
+ if (arr)
+ delete [] arr;
return ss.str ();
}