Beispiel #1
0
        public virtual ktFunction AddMethod(ktFunction Method)
        {
            if (Method == null)
            {
                return null;
            }

            if (m_Methods == null)
            {
                m_Methods = new ktList();
            }

            m_Methods.Add(Method);

            return Method;
        }
 public ktFunctionClass( ktFunction Func )
     : base("ktFunction")
 {
     m_function = Func;
 }
Beispiel #3
0
        public bool AddFunction(ktString Name, ktBlock Block, ktList Arguments, ktValue Ret)
        {
            ktFunction Func = new ktFunction(Name, Arguments, Block, Ret);

            return AddFunction(Func);
        }
Beispiel #4
0
        public bool AddFunction(ktFunction Function)
        {
            // No Function??
            if (Function == null)
            {
                return false;
            }

            // Create Function list if not set 
            if (m_Functions == null)
            {
                m_Functions = new ktList();
            }

            // Create a new node (with name and func), and add it
            return m_Functions.Add(Function.Name, Function);
        }
Beispiel #5
0
 /// <summary>
 /// Add a function to the main block...
 /// </summary>
 public void AddFunction(ktFunction Func)
 {
     if (m_MainBlock == null)
     {
         m_MainBlock = new ktBlock(m_Lines.First);
     }
     m_MainBlock.AddFunction(Func);
 }