Exemple #1
0
            public ScriptFunction(ProjectState state, IO.XmlStream s) : base(state, s)
            {
                string return_type_name = null;

                s.ReadAttribute("returnType", ref return_type_name);
                s.ReadAttributeOpt("help", ref helpString);
                s.ReadAttributeOpt("helpArg", ref helpArgString);
                s.ReadAttributeOpt("internal", ref IsInternal);

                foreach (XmlNode n in s.Cursor.ChildNodes)
                {
                    if (n.Name != "arg")
                    {
                        continue;
                    }

                    s.SaveCursor(n);
                    args.Add(new ScriptFunctionArg(this, state, s));
                    s.RestoreCursor();
                }

                if (!state.scriptingInterface.Types.Contains(return_type_name))
                {
                    throw new Debug.ExceptionLog("CheApe: value type '{0}' does not exist", return_type_name);
                }
                returnType = state.scriptingInterface.GetValueType(return_type_name);
                help       = state.Compiler.Strings.Add(helpString);
                helpArg    = state.Compiler.Strings.Add(helpArgString);
            }
			public ScriptFunctionArg(ScriptFunction func, ProjectState state, IO.XmlStream s)
			{
				string type_name = null;
				s.ReadAttribute("type", ref type_name);

				if (!state.scriptingInterface.Types.Contains(type_name))
					throw new Debug.ExceptionLog("CheApe: value type '{0}' does not exist", type_name);

				type = state.scriptingInterface.GetValueType(type_name);
			}
Exemple #3
0
            public ScriptFunctionArg(ScriptFunction func, ProjectState state, IO.XmlStream s)
            {
                string type_name = null;

                s.ReadAttribute("type", ref type_name);

                if (!state.scriptingInterface.Types.Contains(type_name))
                {
                    throw new Debug.ExceptionLog("CheApe: value type '{0}' does not exist", type_name);
                }
                type = state.scriptingInterface.GetValueType(type_name);
            }
Exemple #4
0
            public ScriptGlobal(ProjectState state, IO.XmlStream s) : base(state, s)
            {
                string type_name = null;

                s.ReadAttribute("type", ref type_name);
                s.ReadAttributeOpt("internal", ref IsInternal);

                if (!state.scriptingInterface.Types.Contains(type_name))
                {
                    throw new Debug.ExceptionLog("CheApe: value type '{0}' does not exist", type_name);
                }
                type = state.scriptingInterface.GetValueType(type_name);
            }
			public ScriptFunction(ProjectState state, IO.XmlStream s) : base(state, s)
			{
				string return_type_name = null;
				s.ReadAttribute("returnType", ref return_type_name);
				s.ReadAttributeOpt("help", ref helpString);
				s.ReadAttributeOpt("helpArg", ref helpArgString);
				s.ReadAttributeOpt("internal", ref IsInternal);

				foreach (XmlNode n in s.Cursor.ChildNodes)
				{
					if (n.Name != "arg") continue;

					s.SaveCursor(n);
					args.Add(new ScriptFunctionArg(this, state, s));
					s.RestoreCursor();
				}

				if (!state.scriptingInterface.Types.Contains(return_type_name))
					throw new Debug.ExceptionLog("CheApe: value type '{0}' does not exist", return_type_name);

				returnType = state.scriptingInterface.GetValueType(return_type_name);
				help = state.Compiler.Strings.Add(helpString);
				helpArg = state.Compiler.Strings.Add(helpArgString);
			}
			public ScriptGlobal(ProjectState state, IO.XmlStream s) : base(state, s)
			{
				string type_name = null;
				s.ReadAttribute("type", ref type_name);
				s.ReadAttributeOpt("internal", ref IsInternal);

				if (!state.scriptingInterface.Types.Contains(type_name))
					throw new Debug.ExceptionLog("CheApe: value type '{0}' does not exist", type_name);

				type = state.scriptingInterface.GetValueType(type_name);
			}