Ask for a New Virtual Worlds object to be created
From where the objects live and are
brokered
(sites are not places on
the internet they are memory spaces that the object resides in)
Virtual World Server Site |
It holds the true objects and maintains the World Model Database. The server system uses UDP and TCP simultaneously to communicate to clients about changes to the objects they are referencing to communicate object changes and methods with the Client Site. | ||||||
Virtual World Client Site |
This holds objects that act as proxies of the real objects at the Server Site. So they look and act like the real objects to programs. While you invoke a method on the object a signal is sent to the real object and then you are often given a back return object (proxy as well). | ||||||
Prolog Virtual Worlds Site |
|
Type Conversion
1) Virtual Worlds Object
Collection vwsystem.dll/vwmm.dll
2) (soon )
Native COM Collection wrapped in Morphism.Dll
3) Serialized Prolog
Terms Representing Transient or InTransit objects
4) A markup language
(Barely Implemeted)
SITNAME_WINCOM | SITENAME_VWSERVER/SITENAME_VWCLIENT | SITENAME_PROLOG_CLIENT/SITENAME_PROLOG_SERVER | SITENAME_XML | |
NodeKinds Enum | Visual Basic/ActiveX | Virtual Worlds | Prolog | [X,*]ML |
Object | True Object (Set) | Thing | object(?Class,?Type,?ReferenceOrName,?MembersList) | XMLNodeElement |
Collection | For Eachable Collection of Variants | PropertyMap, Menu | lists that only contain: objects
and values Sets |
XMLDOM
or XMLElement |
Value | String,Long,Byte,Integer,Long,Byte, VT_BSTR,VT_UI4, (etc) |
String,Long,Byte,Integer,Long,Byte, Single,Double |
atom, string, quoted terms | XMLNodeElement |
Array | Array of Variants or a single UDT | PropertyList or Variant().. UDT such as Vector, Sound, Model, etc | ?funct(Arg1,Arg2,..) or Ordered Lists ./2 |
|
FuncDesc | MemberName
orAddressOf + DISPARAMS (VTABLE Entry) |
Method, MenuItem | :-/2 , -->,2 ,/2 ;/2 or
Canonical Terms or Static Predicates |
XSLDocument |
How to Access The Objects (The DOM )
ModelKinds Enum |
Visual Basic/ActiveX | Virtual Worlds | Prolog | [X,*]ML |
Property | INVOKE_PROPPUT / INVOKE_PROPGET | Thing.Properties | property(PropertyName,Owner,Type,Value) | |
Method | INVOKE_FUNC | Thing.Methods (without on*) | method(MemberName,Owner,RetrunType,[parameterlist]) | |
Event | INVOKE_EVENTFUNC ( major changes to notifacation system since some sites do not care for unsolicted messaging ) | Thing.Methods (with on*) |
event(MemberName,Owner,[parameterlist]) | |
Content | INVOKE_PROPPUTREF/INVOKE_PROPGETREF | Thing.Contents | object(?Class,?Type,?ReferenceOrName,?MembersList), datum(?Type,?Value) |
|
Parameter | INVOKE_CONST ( Not partucualry Correct) | Thing.Name | datum(?Type,?Value) |
Objects
Non-determently
objects(?Class,?Type,?IDRef,?MemberList)
example:
findall(X,objects(avatar,thing,_Ref,[name=X|_]),ListOfNames).
objects(?Object). % Is the collection of all known objects
example:
findall(X,objects(object(class([avatar]),type([thing]),_Ref,[name=X|_])),ListOfAvatarNames).
member_unify(-Object,?NewMembers).
member_assert(-Object,-NewMembers).
member_retract(-Object,?Members).
member_retractall(-Object,?Members).
Walking an Object's Model
find_member(?Object,?MemberName,?Value)
walk_member(?StartObject,?MembersWalk,?Value)
example:
walk_member(objptr(345345),[error,description],datum(vt_bstr,Text)).
walk_member(_,[error,description],datum(vt_bstr,Text)).
walk_member(_,[_,description],datum(vt_bstr,Text)).
walk_member(_,[_,error,_],datum(vt_bstr,Text)).
walk_member(objptr(345345),[_,_,_],datum(vt_bstr,Text)).
walk_member(_,[error],Err),walk_member(Err,[description],datum(vt_bstr,Text)).
PrologVirtualWorlds Partial
Serialization of COM
(Component Object Models)
We will look at some object models
and see how they manifest in various places in our system. First an
object such as a newly created MSScriptControl.ScriptControl as PrologVirtualWorlds sees it:
Morphism.Dll obj_pl(java_vbscript_engine,4,true) /* 4 levels deep, Ground_Instancing=True */
The SWI-Prolog kernel had no
problems working with an object in this form. This is a ‘term serialization’ of the
object’s model. The MSScriptControl
has ten Members marked as INVOKE_PROPGETable in COM. I am of strong discipline that the
future of properly written windows COM must expose it’s members (in TypeLibs) in
such a way as an object model can be rendered with no side effects to the object
(when using INVOKE_PROPGET/GETREF).
And members where this is unsafe need to hide behind INVOKE_FUNCT
interfaces.
We will use
the rendered serialized model to classify objects and for PrologVirtualWorlds to
understand them later. This
model was constructed 4 levels deep and anything 5 or below was set to Prologs
‘_’ this is so we can Unify objects later.
Look at this call for a non-instanced version (the objptr/1 and datum/2 which are ignored and only vt_variant and vt_empty are explored)
Morphism.Dll obj_pl(java_vbscript_engine,4,fail)
/* 4 levels deep,
Ground_Instancing=False */
This information can be later used
to declare a new object. The smallest object declaration looks like this:
assert_object
(object(class([our,new,class]),type([we,ll,know,later]),_,[])).
This creates a TypeLib info in for we_ll_know_later that has no interface
members.
To add a member to it we
use:
objects
(AnyObject),AnyObject = object(class(_),type([we|_]),_,_).