Ejemplo n.º 1
0
        /// <summary>
        /// This operation returns the Entity associated with the StatusCondition or a
        /// null Entity.
        /// </summary>
        /// <returns>IEntity - a pointer to the Entity associated with the StatusCondition.</returns>
        public IEntity GetEntity()
        {
            IntPtr  gapiPtr = OpenSplice.Gapi.StatusCondition.get_entity(GapiPeer);
            IEntity entity  = SacsSuperClass.fromUserData(gapiPtr) as IEntity;

            return(entity);
        }
Ejemplo n.º 2
0
        public IDomainParticipant LookupParticipant(string domainId)
        {
            IntPtr             gapiDP      = OpenSplice.Gapi.DomainParticipantFactory.lookup_participant(GapiPeer, domainId);
            IDomainParticipant participant = (IDomainParticipant)SacsSuperClass.fromUserData(gapiDP);

            return(participant);
        }
Ejemplo n.º 3
0
        internal static void CopyOut(IntPtr from, ref TInterface[] to, int offset)
        {
            // Get _length field
            int length = BaseMarshaler.ReadInt32(from, offset + offset__length);

            // Initialize managed array to the correct size.
            // Initialize managed array to the correct size.
            if (to == null || to.Length != length)
            {
                to = new TInterface[length];
            }

            if (length > 0)
            {
                // Read the buffer pointer containing the sequence content
                IntPtr arrayPtr = BaseMarshaler.ReadIntPtr(from, offset + offset__buffer);

                for (int index = 0; index < length; index++)
                {
                    // Loop through the string pointers, deallocating each
                    IntPtr GapiPtr = BaseMarshaler.ReadIntPtr(arrayPtr, Size * index);
                    to[index] = (TInterface)(T)SacsSuperClass.fromUserData(GapiPtr);
                }
            }
        }
Ejemplo n.º 4
0
        internal new void DeleteEntityAction(IntPtr entityData, IntPtr userData)
        {
            // Translate the UserData pointer into a valid C# language object.
            SacsSuperClass entity = SacsSuperClass.fromUserData(entityData);

            // If the UserData contained a valid object, then destruct it.
            if (entity != null)
            {
                entity.Dispose();
            }
        }