예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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));
        }
예제 #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);
        }
예제 #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]);
        }
예제 #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);
        }
예제 #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]);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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>();
        }
예제 #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);
        }
예제 #19
0
 public RiffFile(ByteArray aByteArray)
     : base(chunkTypeDictionary, bodyTypeDictionary, ID, ( UInt32 )aByteArray.Length, aByteArray, null)
 {
     name          = aByteArray.GetName();
     riffChunkList = ( RiffChunkList )GetChunk("RIFF");
 }