Esempio n. 1
0
 public ExhaustiveMapValueData(
     global::Improbable.Collections.Map <string, float> field2,
     global::Improbable.Collections.Map <string, int> field4,
     global::Improbable.Collections.Map <string, long> field5,
     global::Improbable.Collections.Map <string, double> field6,
     global::Improbable.Collections.Map <string, string> field7,
     global::Improbable.Collections.Map <string, uint> field8,
     global::Improbable.Collections.Map <string, ulong> field9,
     global::Improbable.Collections.Map <string, int> field10,
     global::Improbable.Collections.Map <string, long> field11,
     global::Improbable.Collections.Map <string, uint> field12,
     global::Improbable.Collections.Map <string, ulong> field13,
     global::Improbable.Collections.Map <string, int> field14,
     global::Improbable.Collections.Map <string, long> field15,
     global::Improbable.Collections.Map <string, global::Improbable.EntityId> field16,
     global::Improbable.Collections.Map <string, global::Improbable.Gdk.Tests.SomeType> field17)
 {
     this.field2  = field2;
     this.field4  = field4;
     this.field5  = field5;
     this.field6  = field6;
     this.field7  = field7;
     this.field8  = field8;
     this.field9  = field9;
     this.field10 = field10;
     this.field11 = field11;
     this.field12 = field12;
     this.field13 = field13;
     this.field14 = field14;
     this.field15 = field15;
     this.field16 = field16;
     this.field17 = field17;
 }
Esempio n. 2
0
 public EntityAclData(
     global::Improbable.WorkerRequirementSet readAcl,
     global::Improbable.Collections.Map <uint, global::Improbable.WorkerRequirementSet> componentWriteAcl)
 {
     this.readAcl           = readAcl;
     this.componentWriteAcl = componentWriteAcl;
 }
 public ExhaustiveMapKeyData(
     global::Improbable.Collections.Map <float, string> field2,
     global::Improbable.Collections.Map <int, string> field4,
     global::Improbable.Collections.Map <long, string> field5,
     global::Improbable.Collections.Map <double, string> field6,
     global::Improbable.Collections.Map <string, string> field7,
     global::Improbable.Collections.Map <uint, string> field8,
     global::Improbable.Collections.Map <ulong, string> field9,
     global::Improbable.Collections.Map <int, string> field10,
     global::Improbable.Collections.Map <long, string> field11,
     global::Improbable.Collections.Map <uint, string> field12,
     global::Improbable.Collections.Map <ulong, string> field13,
     global::Improbable.Collections.Map <int, string> field14,
     global::Improbable.Collections.Map <long, string> field15,
     global::Improbable.Collections.Map <global::Improbable.EntityId, string> field16,
     global::Improbable.Collections.Map <global::Improbable.Gdk.Tests.SomeType, string> field17)
 {
     this.field2  = field2;
     this.field4  = field4;
     this.field5  = field5;
     this.field6  = field6;
     this.field7  = field7;
     this.field8  = field8;
     this.field9  = field9;
     this.field10 = field10;
     this.field11 = field11;
     this.field12 = field12;
     this.field13 = field13;
     this.field14 = field14;
     this.field15 = field15;
     this.field16 = field16;
     this.field17 = field17;
 }
Esempio n. 4
0
 public Data(
     global::Improbable.WorkerRequirementSet readAcl,
     global::Improbable.Collections.Map <uint, global::Improbable.WorkerRequirementSet> componentWriteAcl)
 {
     Value = new global::Improbable.EntityAclData(
         readAcl,
         componentWriteAcl);
 }
Esempio n. 5
0
 public Update SetComponentInterest(global::Improbable.Collections.Map <uint, global::Improbable.ComponentInterest> _value)
 {
     if (_value == null)
     {
         throw new System.ArgumentNullException(null, "Attempt to send update with null value.");
     }
     componentInterest.Set(_value);
     return(this);
 }
Esempio n. 6
0
 public Update SetComponentWriteAcl(global::Improbable.Collections.Map <uint, global::Improbable.WorkerRequirementSet> _value)
 {
     if (_value == null)
     {
         throw new System.ArgumentNullException(null, "Attempt to send update with null value.");
     }
     componentWriteAcl.Set(_value);
     return(this);
 }
Esempio n. 7
0
 ComponentUpdateDeserialize(global::System.UInt32 componentId,
                            global::System.UIntPtr userData,
                            global::Improbable.Worker.CInterop.SchemaComponentUpdate source,
                            out global::System.UIntPtr handleOut)
 {
     handleOut = global::System.UIntPtr.Zero;
     try
     {
         var data               = new Update();
         var fieldsToClear      = new global::System.Collections.Generic.HashSet <uint>();
         var fieldsToClearCount = source.GetClearedFieldCount();
         for (uint i = 0; i < fieldsToClearCount; ++i)
         {
             fieldsToClear.Add(source.IndexClearedField(i));
         }
         var fields = source.GetFields();
         if (fields.GetObjectCount(1) > 0)
         {
             global::Improbable.WorkerRequirementSet field;
             {
                 field = global::Improbable.WorkerRequirementSet_Internal.Read(fields.GetObject(1));
             }
             data.readAcl.Set(field);
         }
         if (fields.GetObjectCount(2) > 0 || fieldsToClear.Contains(2))
         {
             global::Improbable.Collections.Map <uint, global::Improbable.WorkerRequirementSet> field;
             {
                 var _count = fields.GetObjectCount(2);
                 field = new global::Improbable.Collections.Map <uint, global::Improbable.WorkerRequirementSet>((int)_count);
                 for (uint _i = 0; _i < _count; ++_i)
                 {
                     var _pair = fields.IndexObject(2, _i);
                     field.Add(_pair.GetUint32(1), global::Improbable.WorkerRequirementSet_Internal.Read(_pair.GetObject(2)));
                 }
             }
             data.componentWriteAcl.Set(field);
         }
         var handle = global::Improbable.Worker.Internal.ClientHandles.HandleAlloc();
         *handle   = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
         handleOut = (global::System.UIntPtr)handle;
     }
     catch (global::System.Exception e)
     {
         global::Improbable.Worker.ClientError.LogClientException(e);
         return(false);
     }
     return(true);
 }
Esempio n. 8
0
 public Data(global::Improbable.Collections.Map <uint, global::Improbable.ComponentInterest> componentInterest)
 {
     Value = new global::Improbable.InterestData(componentInterest);
 }
 public InterestData(global::Improbable.Collections.Map <uint, global::Improbable.ComponentInterest> componentInterest)
 {
     this.componentInterest = componentInterest;
 }
Esempio n. 10
0
 ClientDeserialize(global::System.UInt32 componentId,
                   void *userData,
                   global::System.Byte handleType,
                   global::Improbable.Worker.Internal.Pbio.Object *root,
                   global::Improbable.Worker.Internal.ComponentProtocol.ClientHandle **handleOut)
 {
     *handleOut = null;
     try
     {
         *handleOut = global::Improbable.Worker.Internal.ClientHandles.HandleAlloc();
         if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Update)
         {
             var data               = new Update();
             var fieldsToClear      = new global::System.Collections.Generic.HashSet <uint>();
             var fieldsToClearCount = global::Improbable.Worker.Internal.Pbio.GetUint32Count(root, /* fields to clear */ 1);
             for (uint i = 0; i < fieldsToClearCount; ++i)
             {
                 fieldsToClear.Add(global::Improbable.Worker.Internal.Pbio.IndexUint32(root, /* fields to clear */ 1, i));
             }
             var stateObject = global::Improbable.Worker.Internal.Pbio.GetObject(
                 global::Improbable.Worker.Internal.Pbio.GetObject(root, /* entity_state */ 2), 58);
             if (global::Improbable.Worker.Internal.Pbio.GetObjectCount(stateObject, 1) > 0 || fieldsToClear.Contains(1))
             {
                 global::Improbable.Collections.Map <uint, global::Improbable.ComponentInterest> field;
                 {
                     var _count = global::Improbable.Worker.Internal.Pbio.GetObjectCount(stateObject, 1);
                     field = new global::Improbable.Collections.Map <uint, global::Improbable.ComponentInterest>((int)_count);
                     for (uint _i = 0; _i < _count; ++_i)
                     {
                         var _pair = global::Improbable.Worker.Internal.Pbio.IndexObject(stateObject, 1, _i);
                         field.Add(global::Improbable.Worker.Internal.Pbio.GetUint32(_pair, 1), global::Improbable.ComponentInterest_Internal.Read(global::Improbable.Worker.Internal.Pbio.GetObject(_pair, 2)));
                     }
                 }
                 data.componentInterest.Set(field);
             }
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Snapshot)
         {
             var data = new Data(global::Improbable.InterestData_Internal.Read(
                                     global::Improbable.Worker.Internal.Pbio.GetObject(root, 58)));
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Request)
         {
             var data = new global::Improbable.Worker.Internal.GenericCommandObject();
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
             return(0);
         }
         else if (handleType == (byte)global::Improbable.Worker.Internal.ComponentProtocol.ClientHandleType.Response)
         {
             var data = new global::Improbable.Worker.Internal.GenericCommandObject();
             **handleOut = global::Improbable.Worker.Internal.ClientHandles.Instance.CreateHandle(data);
             return(0);
         }
     }
     catch (global::System.Exception e)
     {
         global::Improbable.Worker.ClientError.LogClientException(e);
         return(0);
     }
     return(1);
 }