///<summary> Reads this HLApublishObjectClassAttributesMessage from the specified stream.</summary>
        ///<param name="reader"> the input stream to read from</param>
        ///<returns> the object</returns>
        ///<exception cref="System.IO.IOException"> if an error occurs</exception>
        public override object Deserialize(HlaEncodingReader reader, ref object msg)
        {
            HLApublishObjectClassAttributesMessage decodedValue;

            if (!(msg is HLApublishObjectClassAttributesMessage))
            {
                decodedValue = new HLApublishObjectClassAttributesMessage();
                BaseInteractionMessage baseMsg = msg as BaseInteractionMessage;
                decodedValue.InteractionClassHandle    = baseMsg.InteractionClassHandle;
                decodedValue.FederationExecutionHandle = baseMsg.FederationExecutionHandle;
                decodedValue.UserSuppliedTag           = baseMsg.UserSuppliedTag;
            }
            else
            {
                decodedValue = msg as HLApublishObjectClassAttributesMessage;
            }
            object tmp = decodedValue;

            decodedValue = base.Deserialize(reader, ref tmp) as HLApublishObjectClassAttributesMessage;
            try
            {
                byte[] objectClassByteArray = reader.ReadHLAopaqueData();
                decodedValue.HLAobjectClass = objectClassFactory.Decode(objectClassByteArray, 0);

                decodedValue.HLAattributeList = attributeHandleSetFactory.Create();

                int count = reader.ReadHLAinteger32BE();

                for (int i = 0; i < count; i++)
                {
                    IAttributeHandle attributeHandle = attributeHandleFactory.Decode(reader.ReadHLAopaqueData(), 0);
                    decodedValue.HLAattributeList.Add(attributeHandle);
                }

                /*
                 * decodedValue.HLAobjectClass = new byte[reader.ReadHLAinteger32BE()];
                 *
                 * for (int i = 0; i < decodedValue.HLAobjectClass.Length; i++)
                 * {
                 *  decodedValue.HLAobjectClass[i] = reader.ReadHLAoctet();
                 * }
                 * decodedValue.HLAattributeList = new byte[reader.ReadHLAinteger32BE()][];
                 *
                 * for (int i = 0; i < decodedValue.HLAattributeList.Length; i++)
                 * {
                 *  decodedValue.HLAattributeList[i] = new byte[reader.ReadHLAinteger32BE()];
                 *
                 *  for (int j = 0; j < decodedValue.HLAattributeList[i].Length; j++)
                 *  {
                 *      decodedValue.HLAattributeList[i][j] = reader.ReadHLAoctet();
                 *  }
                 * }
                 */
            }
            catch (System.IO.IOException ioe)
            {
                throw new RTIinternalError(ioe.ToString());
            }
            return(decodedValue);
        }
 public override void OnReceiveHLApublishObjectClassAttributes(HLApublishObjectClassAttributesMessage msg)
 {
     if (log.IsDebugEnabled)
         log.Debug("[" + federationName + "] Received HLApublishObjectClassAttributes =  " + msg.ToString());
 }
 ///<summary>
 ///Set the joined federate's publication status of attributes belonging
 ///to an object class. 
 ///</summary>
 ///<param name="msg"> the message associated with the interaction</param>
 ///<exception cref="InteractionClassNotRecognized"> if the interaction class was not recognized</exception>
 ///<exception cref="InteractionParameterNotRecognized"> if a parameter of the interaction was not
 /// recognized</exception>
 ///<exception cref="InteractionClassNotSubscribed"> if the federate had not subscribed to the
 /// interaction class</exception>
 ///<exception cref="FederateInternalError"> if an error occurs in the federate</exception>
 public abstract void OnReceiveHLApublishObjectClassAttributes(HLApublishObjectClassAttributesMessage msg);
        ///<summary> Reads this HLApublishObjectClassAttributesMessage from the specified stream.</summary>
        ///<param name="reader"> the input stream to read from</param>
        ///<returns> the object</returns>
        ///<exception cref="System.IO.IOException"> if an error occurs</exception>
        public override object Deserialize(HlaEncodingReader reader, ref object msg)
        {
            HLApublishObjectClassAttributesMessage decodedValue;
            if (!(msg is HLApublishObjectClassAttributesMessage))
            {
                decodedValue = new HLApublishObjectClassAttributesMessage();
                BaseInteractionMessage baseMsg = msg as BaseInteractionMessage;
                decodedValue.InteractionClassHandle = baseMsg.InteractionClassHandle;
                decodedValue.FederationExecutionHandle = baseMsg.FederationExecutionHandle;
                decodedValue.UserSuppliedTag = baseMsg.UserSuppliedTag;
            }
            else
            {
                decodedValue = msg as HLApublishObjectClassAttributesMessage;
            }
            object tmp = decodedValue;
            decodedValue = base.Deserialize(reader, ref tmp) as HLApublishObjectClassAttributesMessage;
            try
            {
                byte[] objectClassByteArray = reader.ReadHLAopaqueData();
                decodedValue.HLAobjectClass = objectClassFactory.Decode(objectClassByteArray, 0);

                decodedValue.HLAattributeList = attributeHandleSetFactory.Create();

                int count = reader.ReadHLAinteger32BE();

                for (int i = 0; i < count; i++)
                {
                    IAttributeHandle attributeHandle = attributeHandleFactory.Decode(reader.ReadHLAopaqueData(), 0);
                    decodedValue.HLAattributeList.Add(attributeHandle);
                }

                /*
                decodedValue.HLAobjectClass = new byte[reader.ReadHLAinteger32BE()];

                for (int i = 0; i < decodedValue.HLAobjectClass.Length; i++)
                {
                    decodedValue.HLAobjectClass[i] = reader.ReadHLAoctet();
                }
                decodedValue.HLAattributeList = new byte[reader.ReadHLAinteger32BE()][];

                for (int i = 0; i < decodedValue.HLAattributeList.Length; i++)
                {
                    decodedValue.HLAattributeList[i] = new byte[reader.ReadHLAinteger32BE()];

                    for (int j = 0; j < decodedValue.HLAattributeList[i].Length; j++)
                    {
                        decodedValue.HLAattributeList[i][j] = reader.ReadHLAoctet();
                    }
                }
                */
            }
            catch (System.IO.IOException ioe)
            {
                throw new RTIinternalError(ioe.ToString());
            }
            return decodedValue;
        }