Ejemplo n.º 1
0
        public RiffChunkIprd(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            product = aByteArray.ReadString(( int )size);

            informationList.Add("Product:" + product);
        }
Ejemplo n.º 2
0
        public RiffChunkIsng(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            unknown = aByteArray.ReadString(( int )size);

            informationList.Add("Unknown:" + unknown);
        }
Ejemplo n.º 3
0
        public RiffChunkUnknown(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            Logger.LogWarning("Unknown Type");

            dataArray = aByteArray.ReadBytes(( int )size);
        }
Ejemplo n.º 4
0
        public RiffChunkInam(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            name = aByteArray.ReadString(( int )size);

            informationList.Add("Name:" + name);
        }
Ejemplo n.º 5
0
        public RiffChunkItch(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            technician = aByteArray.ReadString(( int )size);

            informationList.Add("Technician:" + technician);
        }
Ejemplo n.º 6
0
        public RiffChunkIkey(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            keywords = aByteArray.ReadString(( int )size);

            informationList.Add("Keywords:" + keywords);
        }
Ejemplo n.º 7
0
        public RiffChunkIart(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            artist = aByteArray.ReadString(( int )size);

            informationList.Add("Artist:" + artist);
        }
Ejemplo n.º 8
0
        public RiffChunkIeng(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            engineer = aByteArray.ReadString(( int )size);

            informationList.Add("Engineer:" + engineer);
        }
Ejemplo n.º 9
0
        public RiffChunkIcmt(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            comment = aByteArray.ReadString(( int )size);

            informationList.Add("Comment:" + comment);
        }
Ejemplo n.º 10
0
        public RiffChunk Construct(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
        {
            Type[]   lArgumentTypes = { typeof(string), typeof(UInt32), typeof(ByteArray), typeof(RiffChunkList) };
            object[] lArguments     = { aId, aSize, aByteArray, aParent };

            Type lTypeChunk = typeof(RiffChunkUnknown);

            if (aId == "RIFF" || aId == "LIST")
            {
                type = aByteArray.ReadString(4);

                if (listTypeDictionary.ContainsKey(type) == true)
                {
                    lTypeChunk = listTypeDictionary[type];
                }
                else
                {
                    Logger.LogError("Unknown:" + type);
                }
            }
            else
            {
                if (chunkTypeDictionary.ContainsKey(aId) == true)
                {
                    lTypeChunk = chunkTypeDictionary[aId];
                }
            }

            return(( RiffChunk )lTypeChunk.GetConstructor(lArgumentTypes).Invoke(lArguments));
        }
Ejemplo n.º 11
0
        public RiffChunkIsbj(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            subject = aByteArray.ReadString(( int )size);

            informationList.Add("Subject:" + subject);
        }
Ejemplo n.º 12
0
        protected RiffChunkList GetChunkList(string aId, string aType)
        {
            if (listListDictionary.ContainsKey(aType) == true)
            {
                return(listListDictionary[aType][0]);
            }

            List <RiffChunkList> lListList = new List <RiffChunkList>();

            for (int i = 0; i < chunkList.Count; i++)
            {
                if (chunkList[i].id == aId)
                {
                    RiffChunkList lRiffList = ( RiffChunkList )chunkList[i];

                    if (lRiffList.type == aType)
                    {
                        lListList.Add(( RiffChunkList )chunkList[i]);
                    }
                }
            }

            listListDictionary.Add(aType, lListList);

            if (listListDictionary[aType].Count < 1)
            {
                Logger.LogErrorBreak("List is not exist.");
            }
            else if (listListDictionary[aType].Count > 1)
            {
                Logger.LogErrorBreak("List exist more than 1.");
            }

            return(listListDictionary[aType][0]);
        }
Ejemplo n.º 13
0
        public RiffChunkIgnr(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            genre = aByteArray.ReadString(( int )size);

            informationList.Add("Genre:" + genre);
        }
Ejemplo n.º 14
0
        protected List <RiffChunkList> GetChunkListList(string aId, string aType)
        {
            if (listListDictionary.ContainsKey(aType) == true)
            {
                return(listListDictionary[aType]);
            }

            List <RiffChunkList> lListList = new List <RiffChunkList>();

            for (int i = 0; i < chunkList.Count; i++)
            {
                if (chunkList[i].id == aId)
                {
                    RiffChunkList lRiffList = ( RiffChunkList )chunkList[i];

                    if (lRiffList.type == aType)
                    {
                        lListList.Add(( RiffChunkList )chunkList[i]);
                    }
                }
            }

            listListDictionary.Add(aType, lListList);

            return(listListDictionary[aType]);
        }
Ejemplo n.º 15
0
        public RiffChunkIsft(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            software = aByteArray.ReadString(( int )size);

            informationList.Add("Software:" + software);
        }
Ejemplo n.º 16
0
        public RiffChunkIcrd(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            creationDate = aByteArray.ReadString(( int )size);

            informationList.Add("Creation Date:" + creationDate);
        }
Ejemplo n.º 17
0
        protected RiffChunk(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
        {
            id     = aId;
            size   = aSize;
            parent = aParent;

            if (aByteArray != null)
            {
                position = ( UInt32 )aByteArray.Position;
            }

            informationList = new List <string>();
        }
Ejemplo n.º 18
0
        protected RiffChunkList(Dictionary <string, Type> aChunkTypeDictionary, Dictionary <string, Type> aBodyTypeDictionary, string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent)
            : base(aId, aSize, aByteArray, aParent)
        {
            chunkTypeDictionary = aChunkTypeDictionary;
            listTypeDictionary  = aBodyTypeDictionary;

            chunkList          = new List <RiffChunk>();
            listListDictionary = new Dictionary <string, List <RiffChunkList> >();

            int lStartPosition = aByteArray.Position;

            try {
                while (aByteArray.Position < lStartPosition + aSize - 4)
                {
                    ReadChunk(aByteArray);
                }
            }
            catch (Exception aExpection) {
                Logger.LogError("Expection at RIFF Read:" + aExpection.ToString());
            }

            aByteArray.SetPosition(lStartPosition + ( int )aSize - 4);
        }
Ejemplo n.º 19
0
 public RiffFile(ByteArray aByteArray)
     : base(chunkTypeDictionary, bodyTypeDictionary, ID, ( UInt32 )aByteArray.Length, aByteArray, null)
 {
     name          = aByteArray.GetName();
     riffChunkList = ( RiffChunkList )GetChunk("RIFF");
 }