[frr@rysanekf2 kludge]$ telnet localhost 11111 Trying 127.0.0.1... Negotiating binary mode on output. Connected to rysanekf2.pragonet.cz. Escape character is '^]'. This is Kludge - an object database/directory server (cough). If you're duly kind to me, I won't crash on you, I promise. > pwd; Current Kludge Path is "/". > get .; ROOT { CLASS "Root_Class"; INSTANCE "Root_Instance" "Root_Instance_Class" ""; }; > get Root_Class; CLASS "Root_Class" { CLASS "Root_Instance_Class"; }; > get Root_Instance_Class; CLASS "Root_Instance_Class" { }; > get Root_Instance; INSTANCE "Root_Instance" "Root_Instance_Class" "" { }; > INSERT Root_Class CLASS Object; > INSERT Root_Class CLASS Property; > INSERT Root_Class CLASS Blob; > INSERT Blob CLASS Binary_Blob; > INSERT Blob CLASS Text_Blob; > MOVE Root_Instance_Class Object; > GET Object; CLASS "Object" { CLASS "Root_Instance_Class"; }; > GET Root_Class; CLASS "Root_Class" { CLASS "Blob"; CLASS "Object"; CLASS "Property"; }; > get Blob; CLASS "Blob" { CLASS "Binary_Blob"; CLASS "Text_Blob"; }; > INSERT Object CLASS Container; > INSERT Root_Instance_Class CLASS_RELATIONSHIP Contents { Parse_Obj_Def(): Unexpected non-punctuation token. After declaring the insertion of 'CLASS_RELATIONSHIP', you have to define its mandatory attributes, enclosed in curly braces. Error parsing an object definition within an INSERT command. > > INSERT Root_Instance_Class CLASS_RELATIONSHIP { > NAME_M = Contents; > NAME_S = OWNER; > TYPE = OWN; > MASTER = Root_Instance_Class; > SLAVE = Container; > }; > INSERT Root_Instance INSTANCE My_Stuff Container Root_Instance_Class/Contents; > GET Root_Instance; INSTANCE "Root_Instance" "Root_Instance_Class" "" { INSTANCE "My_Stuff" "Container" "/Root_Class/Object/Root_Instance_Class/Contents"; }; > GET Root_Instance_Class; CLASS "Root_Instance_Class" { CLASS_RELATIONSHIP "Contents"; }; > GET Container; CLASS "Container" { CLASS_RELATIONSHIP "OWNER"; }; > GET Root_Instance_Class/Contents; CLASS_RELATIONSHIP { MASTER="/Root_Class/Object/Root_Instance_Class/"; SLAVE="/Root_Class/Object/Container/"; TYPE="OWN"; NAME_M="Contents"; NAME_S="OWNER"; MINCOUNT_M="0"; MAXCOUNT_M="1"; DEFAULTCOUNT_M="0"; NAMINGGEN_M=""; NAMINGMATCH_M=""; MINCOUNT_S="0"; MAXCOUNT_S="1"; NAMINGGEN_S=""; NAMINGMATCH_S=""; }; > GET Container/OWNER; CLASS_RELATIONSHIP { MASTER="/Root_Class/Object/Root_Instance_Class/"; SLAVE="/Root_Class/Object/Container/"; TYPE="OWN"; NAME_M="Contents"; NAME_S="OWNER"; MINCOUNT_M="0"; MAXCOUNT_M="1"; DEFAULTCOUNT_M="0"; NAMINGGEN_M=""; NAMINGMATCH_M=""; MINCOUNT_S="0"; MAXCOUNT_S="1"; NAMINGGEN_S=""; NAMINGMATCH_S=""; }; > SET Container/OWNER MAXCOUNT_M=2000000000; > GET Root_Instance_Class/Contents; CLASS_RELATIONSHIP { MASTER="/Root_Class/Object/Root_Instance_Class/"; SLAVE="/Root_Class/Object/Container/"; TYPE="OWN"; NAME_M="Contents"; NAME_S="OWNER"; MINCOUNT_M="0"; MAXCOUNT_M="2000000000"; DEFAULTCOUNT_M="0"; NAMINGGEN_M=""; NAMINGMATCH_M=""; MINCOUNT_S="0"; MAXCOUNT_S="1"; NAMINGGEN_S=""; NAMINGMATCH_S=""; }; > INSERT Object CLASS Animal; > INSERT Animal CLASS Cat; > INSERT Animal CLASS Dog; > INSERT Animal CLASS Mouse; > INSERT Object CLASS Home; > INSERT Container CLASS_RELATIONSHIP { > MASTER = Container; > SLAVE = Home; > NAME_M = Shelters; > NAME_S = OWNER; > TYPE = OWN; > }; > INSERT Home CLASS_RELATIONSHIP { > MASTER = Home; > SLAVE = Animal; > NAME_M = Inhabitants; > NAME_S = Home; > TYPE = OWN; > }; > INSERT /Root_Instance/My_Stuff INSTANCE Doggie_House Home Container/Shelters; > INSERT /Root_Instance/My_Stuff INSTANCE Mouse_Hole Home Container/Shelters; > CD /Root_Instance/My_Stuff/Doggie_House; > pwd; Current Kludge Path is "/Root_Instance/My_Stuff/Doggie_House/". > INSERT . INSTANCE Seamus Dog Home/Inhabitants; > INSERT . INSTANCE Kitty Cat Home/Inhabitants; > CD ../Mouse_Hole; > INSERT . INSTANCE Mickey Mouse Home/Inhabitants; > INSERT . INSTANCE Minnie Mouse Home/Inhabitants; > get .; INSTANCE "Mouse_Hole" "Home" "/Root_Class/Object/Container/Shelters" { INSTANCE "Mickey" "Mouse" "/Root_Class/Object/Home/Inhabitants"; INSTANCE "Minnie" "Mouse" "/Root_Class/Object/Home/Inhabitants"; }; > get ../Doggie_House; INSTANCE "Doggie_House" "Home" "/Root_Class/Object/Container/Shelters" { INSTANCE "Kitty" "Cat" "/Root_Class/Object/Home/Inhabitants"; INSTANCE "Seamus" "Dog" "/Root_Class/Object/Home/Inhabitants"; }; > INSERT Animal CLASS_RELATIONSHIP { > NAME_M = Friend; > NAME_S = Friend_too; > TYPE = P2P; > }; Warning: while inserting a new CLASS_RELATIONSHIP: both MASTER and SLAVE undefined - setting both to the INSERT destination. I.e., the CLASS_RELATIONSHIP just inserted expresses relationship of the single master/slave class to itself. Hope that's what you meant. > GET Animal; CLASS "Animal" { CLASS "Cat"; CLASS "Dog"; CLASS "Mouse"; CLASS_RELATIONSHIP "Friend"; CLASS_RELATIONSHIP "Friend_too"; CLASS_RELATIONSHIP "Home"; }; > INSERT Animal CLASS_RELATIONSHIP { > NAME_M = Husband; > NAME_S = Wife; > TYPE = M/S; > }; Warning: while inserting a new CLASS_RELATIONSHIP: both MASTER and SLAVE undefined - setting both to the INSERT destination. I.e., the CLASS_RELATIONSHIP just inserted expresses relationship of the single master/slave class to itself. Hope that's what you meant. > GET Animal; CLASS "Animal" { CLASS "Cat"; CLASS "Dog"; CLASS "Mouse"; CLASS_RELATIONSHIP "Friend"; CLASS_RELATIONSHIP "Friend_too"; CLASS_RELATIONSHIP "Home"; CLASS_RELATIONSHIP "Husband"; CLASS_RELATIONSHIP "Wife"; }; > INSERT Mouse CLASS_RELATIONSHIP > { > MASTER=Cat; > SLAVE= Mouse; > NAME_M = Enemy; > NAME_S = Enemy; > TYPE=P2P; > }; > get Mouse; CLASS "Mouse" { CLASS_RELATIONSHIP "Enemy"; INHERITED CLASS_RELATIONSHIP "Friend"; INHERITED CLASS_RELATIONSHIP "Friend_too"; INHERITED CLASS_RELATIONSHIP "Home"; INHERITED CLASS_RELATIONSHIP "Husband"; INHERITED CLASS_RELATIONSHIP "Wife"; }; > pwd > ; Current Kludge Path is "/Root_Instance/My_Stuff/Mouse_Hole/". > get .; INSTANCE "Mouse_Hole" "Home" "/Root_Class/Object/Container/Shelters" { INSTANCE "Mickey" "Mouse" "/Root_Class/Object/Home/Inhabitants"; INSTANCE "Minnie" "Mouse" "/Root_Class/Object/Home/Inhabitants"; }; > INSERT Mickey INSTANCE_RELATIONSHIP { > MASTER=Mickey; > SLAVE=Minnie; > NAME_M = Wife; > NAME_S = Husband; > CLS_REL = Mouse/Wife; > }; > get Mickey; INSTANCE "Mickey" "Mouse" "/Root_Class/Object/Home/Inhabitants" { INSTANCE_RELATIONSHIP "Wife"; }; > get Minnie; INSTANCE "Minnie" "Mouse" "/Root_Class/Object/Home/Inhabitants" { INSTANCE_RELATIONSHIP "Husband"; }; > get Mickey/Wife; INSTANCE_RELATIONSHIP { MASTER="/Root_Instance/My_Stuff/Mouse_Hole/Mickey/"; SLAVE="/Root_Instance/My_Stuff/Mouse_Hole/Minnie/"; NAME_M="Wife"; NAME_S="Husband"; CLS_REL="/Root_Class/Object/Animal/Husband"; }; > get Animal; CLASS "Animal" { CLASS "Cat"; CLASS "Dog"; CLASS "Mouse"; CLASS_RELATIONSHIP "Friend"; CLASS_RELATIONSHIP "Friend_too"; CLASS_RELATIONSHIP "Home"; CLASS_RELATIONSHIP "Husband"; CLASS_RELATIONSHIP "Wife"; }; > pwd; Current Kludge Path is "/Root_Instance/My_Stuff/Mouse_Hole/". > cd ../Doggie_House > ; > get .; INSTANCE "Doggie_House" "Home" "/Root_Class/Object/Container/Shelters" { INSTANCE "Kitty" "Cat" "/Root_Class/Object/Home/Inhabitants"; INSTANCE "Seamus" "Dog" "/Root_Class/Object/Home/Inhabitants"; }; > INSERT Kitty INSTANCE_RELATIONSHIP { > MASTER = Kitty; > SLAVE = Seamus; > NAME_M = Friend; > NAME_S = Friend; > CLS_REL = Cat/Friend; > }; > INSERT Kitty INSTANCE_RELATIONSHIP { > MASTER = Kitty; > SLAVE = ../Mouse_Hole/Mickey; > NAME_M = Enemy_1; > NAME_S = Enemy; > CLS_REL = Cat/Enemy; > }; > INSERT Kitty INSTANCE_RELATIONSHIP { > MASTER = Kitty; > SLAVE = ../Mouse_Hole/Minnie; > NAME_M = Enemy_2; > NAME_S = Enemy; > CLS_REL = Cat/Enemy; > }; > get Kitty; INSTANCE "Kitty" "Cat" "/Root_Class/Object/Home/Inhabitants" { INSTANCE_RELATIONSHIP "Enemy_1"; INSTANCE_RELATIONSHIP "Enemy_2"; INSTANCE_RELATIONSHIP "Friend"; }; > get ../Mouse_Hole/Minnie; INSTANCE "Minnie" "Mouse" "/Root_Class/Object/Home/Inhabitants" { INSTANCE_RELATIONSHIP "Enemy"; INSTANCE_RELATIONSHIP "Husband"; }; > get ../Mouse_Hole/Mickey; INSTANCE "Mickey" "Mouse" "/Root_Class/Object/Home/Inhabitants" { INSTANCE_RELATIONSHIP "Enemy"; INSTANCE_RELATIONSHIP "Wife"; }; > get Kitty/Enemy_1; INSTANCE_RELATIONSHIP { MASTER="/Root_Instance/My_Stuff/Doggie_House/Kitty/"; SLAVE="/Root_Instance/My_Stuff/Mouse_Hole/Mickey/"; NAME_M="Enemy_1"; NAME_S="Enemy"; CLS_REL="/Root_Class/Object/Animal/Cat/Enemy"; }; > get ../Mouse_Hole/Mickey/Wife/PEER; INSTANCE "Minnie" "Mouse" "/Root_Class/Object/Home/Inhabitants" { INSTANCE_RELATIONSHIP "Enemy"; INSTANCE_RELATIONSHIP "Husband"; }; > cd /Root_Instance; > get .; INSTANCE "Root_Instance" "Root_Instance_Class" "" { INSTANCE "My_Stuff" "Container" "/Root_Class/Object/Root_Instance_Class/Contents"; }; shell> ./insert_blob.pl "Container METHOD CTOR" CTOR1.pl shell> ./insert_blob.pl "Container METHOD DTOR" DTOR1.pl shell> ./insert_blob.pl "Container METHOD Test" TEST_METH2.pl > get Container; CLASS "Container" { METHOD "CTOR" "1"; METHOD "DTOR" "2"; METHOD "Test" "3"; CLASS_RELATIONSHIP "OWNER"; CLASS_RELATIONSHIP "Shelters"; }; > get Container/CTOR; METHOD "CTOR" { cHJpbnQgJENMSUVOVF9TT0NLRVQgIkhpLCBJJ20gdGhpcyBmdW5ueSBjb25zdHJ1Y3RvciB0aGlu ZyA6KVxuIjsKCnByaW50ICRDTElFTlRfU09DS0VUICJcbi0tIFByaW50aW5nIHJhdyBjb250ZW50 cyBvZiB0aGUgYXJncyBhcnJheSA6IC0tXG4iOwpwcmludCAkQ0xJRU5UX1NPQ0tFVCAiQF8iLCAi XG4iOwoKbXkgJWFyZ3MgPSAoQF8pOwoKcHJpbnQgJENMSUVOVF9TT0NLRVQgIlxuLS0gUHJpbnRp bmcgbWV0aG9kIGFyZ3VtZW50cyAoa2V5OiB2YWx1ZSkgOiAtLVxuIjsKbXkgQHRtcF9rZXlzID0g a2V5cyglYXJncyk7CmZvcmVhY2ggJHNvbWVfa2V5IChAdG1wX2tleXMpCnsKICBwcmludCAkQ0xJ RU5UX1NPQ0tFVCAiJHNvbWVfa2V5OiAkYXJnc3skc29tZV9rZXl9XG4iOwp9CnByaW50ICRDTElF TlRfU09DS0VUICJcbiI7CgppZiAoIGV4aXN0cygkYXJnc3sidGhpcyJ9KSApCnsKICAgbXkgJG9i al9uYW1lID0gS2x1ZGdlX3BsOjpnZXRfb2JqZWN0X25hbWUoJGFyZ3N7InRoaXMifSk7CiAgIHBy aW50ICRDTElFTlRfU09DS0VUICJ0aGlzLT5uYW1lID09IFwiJG9ial9uYW1lXCJcbiI7Cn0KZWxz ZQp7CiAgIHByaW50ICRDTElFTlRfU09DS0VUICIqdGhpcyogdW5kZWZpbmVkIC0gdGhpcyBtZXRo b2Qgd2FzIGNhbGxlZCBzdGF0aWNhbGx5LlxuIjsKfQoKS2x1ZGdlX3BsOjpmbHVzaF9maWxlKCRD TElFTlRfU09DS0VUKTsKCg== }; > pwd; Current Kludge Path is "/Root_Instance/". > INSERT . INSTANCE My_Other_Stuff Container Root_Instance_Class/Contents > ( msg1 = "Testing the CTOR"; some_arg = "3234"; ); Hi, I'm this funny constructor thing :) -- Printing raw contents of the args array : -- msg1 Testing the CTOR some_arg 3234 this 135810472 -- Printing method arguments (key: value) : -- this: 135810472 msg1: Testing the CTOR some_arg: 3234 this->name == "My_Other_Stuff" > RUN ./My_Other_Stuff/Test (arg1=Take_This_Arg; arg2="Bored already?";); This is a sample method. -- Printing raw contents of the args array : -- arg1 Take_This_Arg arg2 Bored already? this 135810472 -- Printing method arguments (key: value) : -- this: 135810472 arg1: Take_This_Arg arg2: Bored already? this->name == "My_Other_Stuff" > DELETE My_Other_Stuff; Cpt. Destructor jr., at your service! :) -- Printing raw contents of the args array : -- this 135810472 -- Printing method arguments (key: value) : -- this: 135810472 this->name == "My_Other_Stuff" > shutdown; > quit; Bye :) Connection closed by foreign host. [frr@rysanekf2 kludge]$