public override void Update(float fPassTime)
        {
            AFIDataList keyList = null;

            foreach (KeyValuePair <string, AFIHeartBeat> kv in mhtHeartBeat)
            {
                AFIHeartBeat heartBeat = (AFIHeartBeat)kv.Value;
                if (heartBeat.Update(fPassTime))
                {
                    if (null == keyList)
                    {
                        keyList = new AFCDataList();
                    }

                    keyList.AddString((string)kv.Key);
                }
            }

            if (null != keyList)
            {
                for (int i = 0; i < keyList.Count(); i++)
                {
                    mhtHeartBeat.Remove(keyList.StringVal(i));
                }
            }
        }
Example #2
0
        public override bool SetInt(int nRow, int nCol, Int64 value)
        {
            if (nRow >= 0 && nRow < mnRow)
            {
                if (!mhtRecordVec.ContainsKey(nRow))
                {
                    AddRow(nRow);
                }
                AFIDataList valueList = (AFIDataList)mhtRecordVec[nRow];
                if (valueList.GetType(nCol) == AFIDataList.VARIANT_TYPE.VTYPE_INT)
                {
                    if (valueList.Int64Val(nCol) != value)
                    {
                        AFCDataList oldValue = new AFCDataList();
                        oldValue.AddInt64(valueList.Int64Val(nCol));

                        valueList.SetInt64(nCol, value);

                        AFCDataList newValue = new AFCDataList();
                        newValue.AddInt64(valueList.Int64Val(nCol));

                        if (null != doHandleDel)
                        {
                            doHandleDel(mSelf, mstrRecordName, eRecordOptype.Updata, nRow, nCol, oldValue, newValue);
                        }
                    }
                }
                return(true);
            }
            return(false);
        }
Example #3
0
        public override bool SetDouble(int nRow, int nCol, double value)
        {
            if (nRow >= 0 && nRow < mnRow)
            {
                if (!mhtRecordVec.ContainsKey(nRow))
                {
                    AddRow(nRow);
                }

                AFIDataList valueList = (AFIDataList)mhtRecordVec[nRow];
                if (valueList.GetType(nCol) == AFIDataList.VARIANT_TYPE.VTYPE_DOUBLE)
                {
                    if (valueList.DoubleVal(nCol) - value > 0.01f ||
                        valueList.DoubleVal(nCol) - value < -0.01f)
                    {
                        AFCDataList oldValue = new AFCDataList();
                        oldValue.AddDouble(valueList.DoubleVal(nCol));

                        valueList.SetDouble(nCol, value);

                        AFCDataList newValue = new AFCDataList();
                        newValue.AddDouble(valueList.DoubleVal(nCol));

                        if (null != doHandleDel)
                        {
                            doHandleDel(mSelf, mstrRecordName, eRecordOptype.Updata, nRow, nCol, oldValue, newValue);
                        }
                    }
                }

                return(true);
            }
            return(false);
        }
Example #4
0
 public AFCRecord(AFIDENTID self, string strRecordName, int nRow, AFIDataList varData)
 {
     mSelf          = self;
     mnRow          = nRow;
     mstrRecordName = strRecordName;
     mVarRecordType = new AFCDataList(varData);
 }
Example #5
0
        public override AFIDataList GetPropertyList()
        {
            AFIDataList varData = new AFCDataList();

            foreach (DictionaryEntry de in mhtProperty)
            {
                varData.AddString(de.Key.ToString());
            }

            return(varData);
        }
Example #6
0
        public override AFIDataList GetObjectList()
        {
            AFIDataList varData = new AFCDataList();

            foreach (KeyValuePair <AFIDENTID, AFIObject> kv in mhtObject)
            {
                varData.AddObject(kv.Key);
            }

            return(varData);
        }
Example #7
0
        public override AFIDataList GetRecordList()
        {
            AFIDataList varData = new AFCDataList();

            foreach (KeyValuePair <string, AFIRecord> de in mhtRecord)
            {
                varData.AddString(de.Key);
            }

            return(varData);
        }
Example #8
0
        public override bool SetPropertyObject(string strPropertyName, AFIDENTID obj)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null == property)
            {
                AFIDataList valueList = new AFCDataList();
                valueList.AddObject(new AFIDENTID());
                property = mPropertyManager.AddProperty(strPropertyName, valueList);
            }

            property.SetObject(obj);
            return(true);
        }
Example #9
0
        public override bool SetPropertyString(string strPropertyName, string strValue)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null == property)
            {
                AFIDataList valueList = new AFCDataList();
                valueList.AddString("");
                property = mPropertyManager.AddProperty(strPropertyName, valueList);
            }

            property.SetString(strValue);
            return(true);
        }
Example #10
0
        public override bool SetPropertyFloat(string strPropertyName, float fValue)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null == property)
            {
                AFIDataList valueList = new AFCDataList();
                valueList.AddFloat(0.0f);
                property = mPropertyManager.AddProperty(strPropertyName, valueList);
            }

            property.SetFloat(fValue);
            return(true);
        }
Example #11
0
        public override bool SetPropertyDouble(string strPropertyName, double dwValue)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null == property)
            {
                AFIDataList valueList = new AFCDataList();
                valueList.AddDouble(0);
                property = mPropertyManager.AddProperty(strPropertyName, valueList);
            }

            property.SetDouble(dwValue);
            return(true);
        }
Example #12
0
        public override bool SetPropertyInt(string strPropertyName, Int64 nValue)
        {
            AFIProperty property = mPropertyManager.GetProperty(strPropertyName);

            if (null == property)
            {
                AFIDataList valueList = new AFCDataList();
                valueList.AddInt64(0);
                property = mPropertyManager.AddProperty(strPropertyName, valueList);
            }

            property.SetInt(nValue);
            return(true);
        }
Example #13
0
        public override bool SetInt(Int64 value)
        {
            if (mVarProperty.Int64Val(0) != value)
            {
                AFCDataList oldValue = new AFCDataList(mVarProperty);

                mVarProperty.SetInt64(0, value);

                AFCDataList newValue = new AFCDataList(mVarProperty);

                if (null != doHandleDel)
                {
                    doHandleDel(mSelf, msPropertyName, oldValue, newValue);
                }
            }

            return(true);
        }
Example #14
0
        public override bool SetObject(AFIDENTID value)
        {
            if (mVarProperty.ObjectVal(0) != value)
            {
                AFCDataList oldValue = new AFCDataList(mVarProperty);

                mVarProperty.SetObject(0, value);

                AFCDataList newValue = new AFCDataList(mVarProperty);

                if (null != doHandleDel)
                {
                    doHandleDel(mSelf, msPropertyName, oldValue, newValue);
                }
            }

            return(true);
        }
Example #15
0
        public override bool SetDataObject(ref AFIDataList.Var_Data value)
        {
            if (mVarProperty.GetType(0) != value.nType)
            {
                AFCDataList oldValue = new AFCDataList(mVarProperty);

                mVarProperty.SetDataObject(0, value);

                AFCDataList newValue = new AFCDataList(mVarProperty);

                if (null != doHandleDel)
                {
                    doHandleDel(mSelf, msPropertyName, oldValue, newValue);
                }
            }

            return(true);
        }
Example #16
0
        public override bool SetFloat(float value)
        {
            if (mVarProperty.FloatVal(0) - value > 0.01f ||
                mVarProperty.FloatVal(0) - value < -0.01f)
            {
                AFCDataList oldValue = new AFCDataList(mVarProperty);

                mVarProperty.SetFloat(0, value);

                AFCDataList newValue = new AFCDataList(mVarProperty);

                if (null != doHandleDel)
                {
                    doHandleDel(mSelf, msPropertyName, oldValue, newValue);
                }
            }

            return(true);
        }
Example #17
0
        public override int AddRow(int nRow, AFIDataList var)
        {
            if (nRow >= 0 && nRow < mnRow)
            {
                if (!mhtRecordVec.ContainsKey(nRow))
                {
                    mhtRecordVec[nRow] = new AFCDataList(var);

                    if (null != doHandleDel)
                    {
                        doHandleDel(mSelf, mstrRecordName, eRecordOptype.Add, nRow, 0, var, var);
                    }
                    return(nRow);
                }
            }


            return(-1);
        }
Example #18
0
        public override bool SetDataObject(int nRow, int nCol, AFCoreEx.AFIDataList.Var_Data value)
        {
            if (nRow >= 0 && nRow < mnRow)
            {
                if (!mhtRecordVec.ContainsKey(nRow))
                {
                    AddRow(nRow);
                }

                AFIDataList valueList = (AFIDataList)mhtRecordVec[nRow];
                if (valueList.GetType(nCol) == value.nType)
                {
                    if (valueList.VarVal(nCol) != value)
                    {
                        AFCDataList oldValue = new AFCDataList();
                        AFCoreEx.AFIDataList.Var_Data xOld = valueList.VarVal(nCol);
                        oldValue.AddDataObject(ref xOld);

                        valueList.SetDataObject(nCol, value);

                        AFCDataList newValue = new AFCDataList();
                        AFCoreEx.AFIDataList.Var_Data xNew = valueList.VarVal(nCol);
                        newValue.AddDataObject(ref xNew);

                        if (null != doHandleDel)
                        {
                            doHandleDel(mSelf, mstrRecordName, eRecordOptype.Updata, nRow, nCol, oldValue, newValue);
                        }
                    }
                    else
                    {
                        return(false);
                    }
                }

                return(true);
            }

            return(false);
        }
Example #19
0
 public AFCProperty(AFIDENTID self, string strPropertyName, AFIDataList varData)
 {
     mSelf          = self;
     msPropertyName = strPropertyName;
     mVarProperty   = new AFCDataList(varData);
 }
Example #20
0
        private void LoadLogicClassDataNodes(string strName)
        {
            AFILogicClass xLogicClass = GetElement(strName);

            if (null != xLogicClass)
            {
                string      strLogicPath = mstrRootPath + xLogicClass.GetPath();
                XmlDocument xmldoc       = new XmlDocument();
                xmldoc.Load(strLogicPath);
                /////////////////////////////////////////////////////////////////

                XmlNode     xRoot          = xmldoc.SelectSingleNode("XML");
                XmlNode     xNodePropertys = xRoot.SelectSingleNode("DataNodes");
                XmlNodeList xNodeList      = xNodePropertys.SelectNodes("DataNode");
                for (int i = 0; i < xNodeList.Count; ++i)
                {
                    XmlNode      xPropertyNode = xNodeList.Item(i);
                    XmlAttribute strID         = xPropertyNode.Attributes["Id"];
                    XmlAttribute strType       = xPropertyNode.Attributes["Type"];

                    switch (strType.Value)
                    {
                    case "int":
                    {
                        AFIDataList xValue = new AFCDataList();
                        xValue.AddInt64(0);
                        xLogicClass.GetPropertyManager().AddProperty(strID.Value, xValue);
                    }
                    break;

                    case "float":
                    {
                        AFIDataList xValue = new AFCDataList();
                        xValue.AddFloat(0.0f);
                        xLogicClass.GetPropertyManager().AddProperty(strID.Value, xValue);
                    }
                    break;

                    case "double":
                    {
                        AFIDataList xValue = new AFCDataList();
                        xValue.AddDouble(0.0f);
                        xLogicClass.GetPropertyManager().AddProperty(strID.Value, xValue);
                    }
                    break;

                    case "string":
                    {
                        AFIDataList xValue = new AFCDataList();
                        xValue.AddString("");
                        xLogicClass.GetPropertyManager().AddProperty(strID.Value, xValue);
                    }
                    break;

                    case "object":
                    {
                        AFIDataList xValue = new AFCDataList();
                        xValue.AddObject(new AFIDENTID(0, 0));
                        xLogicClass.GetPropertyManager().AddProperty(strID.Value, xValue);
                    }
                    break;

                    default:
                        break;
                    }
                }
            }
        }
Example #21
0
        public static void Main()
        {
            AFIKernel kernel = new AFCKernel();

            Console.WriteLine("****************AFIDataList******************");

            AFIDataList var = new AFCDataList();

            for (int i = 0; i < 9; i += 3)
            {
                var.AddInt64(i);
                var.AddFloat((float)i + 1);
                var.AddString((i + 2).ToString());
            }

            for (int i = 0; i < 9; i += 3)
            {
                Int64  n   = var.Int64Val(i);
                float  f   = var.FloatVal(i + 1);
                string str = var.StringVal(i + 2);
                Console.WriteLine(n);
                Console.WriteLine(f);
                Console.WriteLine(str);
            }


            Console.WriteLine("***************AFProperty*******************");

            AFIDENTID ident      = new AFIDENTID(0, 1);
            AFIObject gameObject = kernel.CreateObject(ident, 0, 0, "", "", new AFCDataList());

            AFIDataList valueProperty = new AFCDataList();

            valueProperty.AddInt64(112221);
            gameObject.GetPropertyManager().AddProperty("111", valueProperty);
            Console.WriteLine(gameObject.QueryPropertyInt("111"));

            Console.WriteLine("***************AFRecord*******************");

            AFIDataList valueRecord = new AFCDataList();

            valueRecord.AddInt64(0);
            valueRecord.AddFloat(0);
            valueRecord.AddString("");
            valueRecord.AddObject(ident);

            gameObject.GetRecordManager().AddRecord("testRecord", 10, valueRecord);

            kernel.SetRecordInt(ident, "testRecord", 0, 0, 112221);
            kernel.SetRecordFloat(ident, "testRecord", 0, 1, 1122210.0f);
            kernel.SetRecordString(ident, "testRecord", 0, 2, ";;;;;;112221");
            kernel.SetRecordObject(ident, "testRecord", 0, 3, ident);

            Console.WriteLine(gameObject.QueryRecordInt("testRecord", 0, 0));
            Console.WriteLine(gameObject.QueryRecordFloat("testRecord", 0, 1));
            Console.WriteLine(gameObject.QueryRecordString("testRecord", 0, 2));
            Console.WriteLine(gameObject.QueryRecordObject("testRecord", 0, 3));

            Console.WriteLine(" ");
            Console.WriteLine("***************PropertyAFEvent*******************");

            //挂属性回调,挂表回调
            kernel.RegisterPropertyCallback(ident, "111", OnPropertydHandler);
            kernel.SetPropertyInt(ident, "111", 2456);

            Console.WriteLine(" ");
            Console.WriteLine("***************RecordAFEvent*******************");

            kernel.RegisterRecordCallback(ident, "testRecord", OnRecordEventHandler);
            kernel.SetRecordInt(ident, "testRecord", 0, 0, 1111111);

            Console.WriteLine(" ");
            Console.WriteLine("***************ClassAFEvent*******************");

            kernel.RegisterClassCallBack("CLASSAAAAA", OnClassHandler);
            kernel.CreateObject(new AFIDENTID(0, 2), 0, 0, "CLASSAAAAA", "COAFIGINDEX", new AFCDataList());
            kernel.DestroyObject(new AFIDENTID(0, 2));


            Console.WriteLine(" ");
            Console.WriteLine("***************AFHeartBeat*******************");
            kernel.AddHeartBeat(new AFIDENTID(0, 1), "TestHeartBeat", HeartBeatEventHandler, 5.0f, new AFCDataList());

            while (true)
            {
                System.Threading.Thread.Sleep(1000);
                kernel.UpDate(1.0f);
            }
        }
Example #22
0
        public override AFIObject CreateObject(AFIDENTID self, int nContainerID, int nGroupID, string strClassName, string strConfigIndex, AFIDataList arg)
        {
            if (!mhtObject.ContainsKey(self))
            {
                AFIObject xNewObject = new AFCObject(self, nContainerID, nGroupID, strClassName, strConfigIndex);
                mhtObject.Add(self, xNewObject);

                AFCDataList varConfigID = new AFCDataList();
                varConfigID.AddString(strConfigIndex);
                xNewObject.GetPropertyManager().AddProperty("ConfigID", varConfigID);

                AFCDataList varConfigClass = new AFCDataList();
                varConfigClass.AddString(strClassName);
                xNewObject.GetPropertyManager().AddProperty("ClassName", varConfigClass);

                if (arg.Count() % 2 == 0)
                {
                    for (int i = 0; i < arg.Count() - 1; i += 2)
                    {
                        string strPropertyName         = arg.StringVal(i);
                        AFIDataList.VARIANT_TYPE eType = arg.GetType(i + 1);
                        switch (eType)
                        {
                        case AFIDataList.VARIANT_TYPE.VTYPE_INT:
                        {
                            AFIDataList xDataList = new AFCDataList();
                            xDataList.AddInt64(arg.Int64Val(i + 1));
                            xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
                        }
                        break;

                        case AFIDataList.VARIANT_TYPE.VTYPE_FLOAT:
                        {
                            AFIDataList xDataList = new AFCDataList();
                            xDataList.AddFloat(arg.FloatVal(i + 1));
                            xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
                        }
                        break;

                        case AFIDataList.VARIANT_TYPE.VTYPE_DOUBLE:
                        {
                            AFIDataList xDataList = new AFCDataList();
                            xDataList.AddDouble(arg.DoubleVal(i + 1));
                            xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
                        }
                        break;

                        case AFIDataList.VARIANT_TYPE.VTYPE_STRING:
                        {
                            AFIDataList xDataList = new AFCDataList();
                            xDataList.AddString(arg.StringVal(i + 1));
                            xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
                        }
                        break;

                        case AFIDataList.VARIANT_TYPE.VTYPE_OBJECT:
                        {
                            AFIDataList xDataList = new AFCDataList();
                            xDataList.AddObject(arg.ObjectVal(i + 1));
                            xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
                        }
                        break;

                        default:
                            break;
                        }
                    }
                }

                InitProperty(self, strClassName);
                InitRecord(self, strClassName);

                if (mhtClassHandleDel.ContainsKey(strClassName))
                {
                    ClassHandleDel xHandleDel = (ClassHandleDel)mhtClassHandleDel[strClassName];
                    if (null != xHandleDel && null != xHandleDel.GetHandler())
                    {
                        AFIObject.ClassEventHandler xHandlerList = xHandleDel.GetHandler();
                        xHandlerList(self, nContainerID, nGroupID, AFIObject.CLASS_EVENT_TYPE.OBJECT_CREATE, strClassName, strConfigIndex);
                        xHandlerList(self, nContainerID, nGroupID, AFIObject.CLASS_EVENT_TYPE.OBJECT_LOADDATA, strClassName, strConfigIndex);
                        xHandlerList(self, nContainerID, nGroupID, AFIObject.CLASS_EVENT_TYPE.OBJECT_CREATE_FINISH, strClassName, strConfigIndex);
                    }
                }

                //AFCLog.Instance.Log(AFCLog.LOG_LEVEL.DEBUG, "Create object: " + self.ToString() + " ClassName: " + strClassName + " SceneID: " + nContainerID + " GroupID: " + nGroupID);
                return(xNewObject);
            }

            return(null);
        }
Example #23
0
        public void MainU3D()
        {
            Debug.Log("****************AFIDataList******************");

            AFIDataList var = new AFCDataList();

            for (int i = 0; i < 9; i += 3)
            {
                var.AddInt64(i);
                var.AddFloat((float)i + 1);
                var.AddString((i + 2).ToString());
            }

            for (int i = 0; i < 9; i += 3)
            {
                Int64  n   = var.Int64Val(i);
                float  f   = var.FloatVal(i + 1);
                string str = var.StringVal(i + 2);
                Debug.Log(n);
                Debug.Log(f);
                Debug.Log(str);
            }


            Debug.Log("***************AFProperty*******************");

            AFIDENTID ident      = new AFIDENTID(0, 1);
            AFIObject gameObject = xKernel.CreateObject(ident, 0, 0, "Player", "", new AFCDataList());

            AFIDataList valueProperty = new AFCDataList();

            valueProperty.AddInt64(112221);
            gameObject.GetPropertyManager().AddProperty("111", valueProperty);
            Debug.Log(gameObject.QueryPropertyInt("111"));

            Debug.Log("***************AFRecord*******************");

            AFIDataList valueRecord = new AFCDataList();

            valueRecord.AddInt64(0);
            valueRecord.AddFloat(0);
            valueRecord.AddString("");
            valueRecord.AddObject(ident);

            gameObject.GetRecordManager().AddRecord("testRecord", 10, valueRecord);

            xKernel.SetRecordInt(ident, "testRecord", 0, 0, 112221);
            xKernel.SetRecordFloat(ident, "testRecord", 0, 1, 1122210.0f);
            xKernel.SetRecordString(ident, "testRecord", 0, 2, ";;;;;;112221");
            xKernel.SetRecordObject(ident, "testRecord", 0, 3, ident);

            Debug.Log(gameObject.QueryRecordInt("testRecord", 0, 0));
            Debug.Log(gameObject.QueryRecordFloat("testRecord", 0, 1));
            Debug.Log(gameObject.QueryRecordString("testRecord", 0, 2));
            Debug.Log(gameObject.QueryRecordObject("testRecord", 0, 3));

            Debug.Log(" ");
            Debug.Log("***************PropertyAFEvent*******************");

            //挂属性回调,挂表回调
            xKernel.RegisterPropertyCallback(ident, "111", OnPropertydHandler);
            xKernel.SetPropertyInt(ident, "111", 2456);

            Debug.Log(" ");
            Debug.Log("***************RecordAFEvent*******************");

            xKernel.RegisterRecordCallback(ident, "testRecord", OnRecordEventHandler);
            xKernel.SetRecordInt(ident, "testRecord", 0, 0, 1111111);

            Debug.Log(" ");
            Debug.Log("***************ClassAFEvent*******************");

            xKernel.RegisterClassCallBack("CLASSAAAAA", OnClassHandler);
            xKernel.CreateObject(new AFIDENTID(0, 2), 0, 0, "CLASSAAAAA", "COAFIGINDEX", new AFCDataList());
            xKernel.DestroyObject(new AFIDENTID(0, 2));


            Debug.Log(" ");
            Debug.Log("***************AFHeartBeat*******************");
            xKernel.AddHeartBeat(new AFIDENTID(0, 1), "TestHeartBeat", HeartBeatEventHandler, 5.0f, new AFCDataList());
        }
Example #24
0
        private void LoadLogicClassDataTables(string strName)
        {
            AFILogicClass xLogicClass = GetElement(strName);

            if (null != xLogicClass)
            {
                string strLogicPath = mstrRootPath + xLogicClass.GetPath();

                XmlDocument xmldoc = new XmlDocument();
                xmldoc.Load(strLogicPath);
                /////////////////////////////////////////////////////////////////
                XmlNode xRoot          = xmldoc.SelectSingleNode("XML");
                XmlNode xNodePropertys = xRoot.SelectSingleNode("DataTables");
                if (null != xNodePropertys)
                {
                    XmlNodeList xNodeList = xNodePropertys.SelectNodes("DataTable");
                    if (null != xNodeList)
                    {
                        for (int i = 0; i < xNodeList.Count; ++i)
                        {
                            XmlNode xRecordNode = xNodeList.Item(i);

                            string      strID  = xRecordNode.Attributes["Id"].Value;
                            string      strRow = xRecordNode.Attributes["Row"].Value;
                            AFIDataList xValue = new AFCDataList();

                            XmlNodeList xTagNodeList = xRecordNode.SelectNodes("Col");
                            for (int j = 0; j < xTagNodeList.Count; ++j)
                            {
                                XmlNode xColTagNode = xTagNodeList.Item(j);

                                XmlAttribute strTagID   = xColTagNode.Attributes["Tag"];
                                XmlAttribute strTagType = xColTagNode.Attributes["Type"];


                                switch (strTagType.Value)
                                {
                                case "int":
                                {
                                    xValue.AddInt64(0);
                                }
                                break;

                                case "float":
                                {
                                    xValue.AddFloat(0.0f);
                                }
                                break;

                                case "double":
                                {
                                    xValue.AddDouble(0.0f);
                                }
                                break;

                                case "string":
                                {
                                    xValue.AddString("");
                                }
                                break;

                                case "object":
                                {
                                    xValue.AddObject(new AFIDENTID(0, 0));
                                }
                                break;

                                default:
                                    break;
                                }
                            }

                            xLogicClass.GetRecordManager().AddRecord(strID, int.Parse(strRow), xValue);
                        }
                    }
                }
            }
        }
Example #25
0
        private void LoadInstanceElement(AFILogicClass xLogicClass)
        {
            string strLogicPath = mstrRootPath;

            strLogicPath += xLogicClass.GetInstance();

            XmlDocument xmldoc = new XmlDocument();

            xmldoc.Load(strLogicPath);
            /////////////////////////////////////////////////////////////////

            XmlNode xRoot = xmldoc.SelectSingleNode("XML");

            XmlNodeList xNodeList = xRoot.SelectNodes("Entry");

            for (int i = 0; i < xNodeList.Count; ++i)
            {
                //AFCLog.Instance.Log("Class:" + xLogicClass.GetName());

                XmlNode      xNodeClass = xNodeList.Item(i);
                XmlAttribute strID      = xNodeClass.Attributes["Id"];

                //AFCLog.Instance.Log("ClassID:" + strID.Value);

                AFIElement xElement = GetElement(strID.Value);
                if (null == xElement)
                {
                    xElement = new AFCElement();
                    AddElement(strID.Value, xElement);
                    xLogicClass.AddConfigName(strID.Value);

                    XmlAttributeCollection xCollection = xNodeClass.Attributes;
                    for (int j = 0; j < xCollection.Count; ++j)
                    {
                        XmlAttribute xAttribute = xCollection[j];
                        AFIProperty  xProperty  = xLogicClass.GetPropertyManager().GetProperty(xAttribute.Name);
                        if (null != xProperty)
                        {
                            AFIDataList.VARIANT_TYPE eType = xProperty.GetDataType();
                            switch (eType)
                            {
                            case AFIDataList.VARIANT_TYPE.VTYPE_INT:
                            {
                                AFIDataList xValue = new AFCDataList();
                                xValue.AddInt64(int.Parse(xAttribute.Value));
                                xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue);
                            }
                            break;

                            case AFIDataList.VARIANT_TYPE.VTYPE_FLOAT:
                            {
                                AFIDataList xValue = new AFCDataList();
                                xValue.AddFloat(float.Parse(xAttribute.Value));
                                xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue);
                            }
                            break;

                            case AFIDataList.VARIANT_TYPE.VTYPE_DOUBLE:
                            {
                                AFIDataList xValue = new AFCDataList();
                                xValue.AddDouble(double.Parse(xAttribute.Value));
                                xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue);
                            }
                            break;

                            case AFIDataList.VARIANT_TYPE.VTYPE_STRING:
                            {
                                AFIDataList xValue = new AFCDataList();
                                xValue.AddString(xAttribute.Value);
                                AFIProperty xTestProperty = xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue);
                            }
                            break;

                            case AFIDataList.VARIANT_TYPE.VTYPE_OBJECT:
                            {
                                AFIDataList xValue = new AFCDataList();
                                xValue.AddObject(new AFIDENTID(0, int.Parse(xAttribute.Value)));
                                xElement.GetPropertyManager().AddProperty(xAttribute.Name, xValue);
                            }
                            break;

                            default:
                                break;
                            }
                        }
                    }
                }
            }
        }