void Definition::toString(char *buf, int max, int indent) const { int index=0; OID temp; int modi; char buf2[50]; Event *evt2 = NEW Event(Event::GET_RANGE, m_def); evt2->param<0>(0); evt2->param<1>(m_size); evt2->send(); OID boid = evt2->result(); OID ifobj = Null; Buffer *def = Buffer::lookup(boid); delete evt2; if (def == 0) { buf[0] = 0; return; } for (int i=0; i<indent; i++) strcat(buf, "\t"); while (index < m_size) { temp = def->get(index++); if (temp.isModifier()) { modi = temp.d(); switch (modi) { case modifiers::ENDSUB: strcat(buf, ")"); break; case modifiers::BEGINSUB: strcat(buf, "("); break; case modifiers::UNION: strcat(buf, "union "); break; case modifiers::COMPARE: strcat(buf, "== "); break; default: break; } } else { if (temp == This) { strcat(buf, "."); } else if (index == 1 && temp.get("type") == OID("if")) { ifobj = temp; strcat(buf, "if "); //buildif(buf, temp); } else { temp.toString(buf2, 50); strcat(buf, buf2); strcat(buf, " "); } } } if (ifobj != Null) buildif(buf, ifobj, indent); Buffer::free(boid); }
OID VStore::Object::specialGet(const OID &k) { switch (k.d()) { case 100: break; //delete case 101: break; //size case 102: break; //save case 103: break; case 104: return keys(); case 105: break; //Allkeys case 106: break; //deep } return Null; }