Ejemplo n.º 1
0
 public static bool IsShown(this Racr.AstNode n)
 {
     return(n.AttValue <bool>("IsShown"));
 }
Ejemplo n.º 2
0
 static Control Widget(this Ast n)
 {
     return(n.AttValue <Control>("Widget"));
 }
Ejemplo n.º 3
0
 public static Racr.AstNode FindActive(this Racr.AstNode n, string name)
 {
     return(n.AttValue <Racr.AstNode>("FindActive", name));
 }
Ejemplo n.º 4
0
 public static bool IsLValid(this Racr.AstNode n)
 {
     return(n.AttValue <bool>("IsLValid"));
 }
Ejemplo n.º 5
0
 public static string SExpr(this Racr.AstNode n)
 {
     return(n.AttValue <string>("SExpr"));
 }
Ejemplo n.º 6
0
 public static Racr.AstNode ErrorQuestion(this Racr.AstNode n)
 {
     return(n.AttValue <Racr.AstNode>("ErrorQuestion"));
 }
Ejemplo n.º 7
0
 public static bool IsErrorQuestion(this Ast n)
 {
     return(n.AttValue <bool>("IsErrorQuestion"));
 }
Ejemplo n.º 8
0
 public static Control Widget(this Racr.AstNode n)
 {
     return(n.AttValue <Control>("Widget"));
 }
Ejemplo n.º 9
0
    // Attribute Accessors:

    public static Ast Root(this Ast n)
    {
        return(n.AttValue <Ast>("Root"));
    }
Ejemplo n.º 10
0
 public static Ast ErrorQuestion(this Ast n)
 {
     return(n.AttValue <Ast>("ErrorQuestion"));
 }
Ejemplo n.º 11
0
 public static object Value(this Ast n)
 {
     return(n.AttValue <object>("Value"));
 }
Ejemplo n.º 12
0
 public static Ast FindActive(this Ast n, string name)
 {
     return(n.AttValue <Ast>("FindActive", name));
 }
Ejemplo n.º 13
0
 public static bool IsShown(this Ast n)
 {
     return(n.AttValue <bool>("IsShown"));
 }
Ejemplo n.º 14
0
 public static bool IsActive(this Ast n)
 {
     return(n.AttValue <bool>("IsActive"));
 }
Ejemplo n.º 15
0
 public static Ast GLookup(this Ast n, string name)
 {
     return(n.AttValue <Ast>("GLookup", name));
 }
Ejemplo n.º 16
0
 public static object Value(this Racr.AstNode n)
 {
     return(n.AttValue <object>("Value"));
 }
Ejemplo n.º 17
0
	static void TestFoo() {

		var spec = new MySpec();

		var root = new Racr.AstNode(spec, "A",
		                            new Racr.AstList(
			new B(spec, "abc"),
			new B(spec, "123"),
			new B(spec, "xyz")),
		                            new Racr.AstNode(spec, "C"),
		                            "hiya");


		root.ForEachChild((i, o) => {
			var node = o as Racr.AstNode;
			if (node != null)
				Console.WriteLine("{0}: {1}", i, node.NodeType());
			else
				Console.WriteLine("{0}: {1}", i, o);
		}, new Racr.Range(2));


		Console.WriteLine("---");


		Console.WriteLine("M: {0}", root.M());
		Console.WriteLine("N: {0}", root.N());

		Console.WriteLine("a: {0}", root.AttValue("a"));
		Console.WriteLine("b: {0}", root.AttValue("b", 3));

		Console.WriteLine("kids: {0}", root.AttValue("kids"));
		var index = root.GetList().Child(1).AttValue<int>("bar", 3);
		Console.WriteLine("index: {0}", index);


		Console.WriteLine("---");


		var c = root.FindChild((i, o) => {
			return i == 2;
		}) as Racr.AstNode;

		Console.WriteLine("{0}", c.NodeType());


		Console.WriteLine("---");

		Console.WriteLine(root);
		Console.WriteLine("NodeType: {0}", root.NodeType());
		Console.WriteLine("IsNode: {0}", root.IsNode());
		Console.WriteLine("HasParent: {0}", root.HasParent());
		Console.WriteLine("NumChildren: {0}", root.NumChildren());
		Console.WriteLine("HasChild 'B: {0}", root.HasChild("B"));
		Console.WriteLine("HasChild 'List: {0}", root.HasChild("List"));

		Console.WriteLine("");

		var child = root.GetList();

		Console.WriteLine(child);
		Console.WriteLine("Child 1 -> t: {0}", child.Child(1).GetT());
		Console.WriteLine("IsNode: {0}", child.IsNode());
		Console.WriteLine("HasParent: {0}", child.HasParent());
		Console.WriteLine("ChildIndex: {0}", child.ChildIndex());
		Console.WriteLine("NumChildren: {0}", child.NumChildren());

	}
Ejemplo n.º 18
0
 public static bool Render(this Racr.AstNode n)
 {
     return(n.AttValue <bool>("Render"));
 }
Ejemplo n.º 19
0
 public static int       M(this Racr.AstNode n)
 {
     return((int)n.AttValue("M"));
 }
Ejemplo n.º 20
0
 // Attribute Accessors
 public static Racr.AstNode Root(this Racr.AstNode n)
 {
     return(n.AttValue <Racr.AstNode>("Root"));
 }
Ejemplo n.º 21
0
 public static bool      N(this Racr.AstNode n)
 {
     return((bool)n.AttValue("N"));
 }
Ejemplo n.º 22
0
 public static Racr.AstNode LLookup(this Racr.AstNode n, string name)
 {
     return(n.AttValue <Racr.AstNode>("LLookup", name));
 }
Ejemplo n.º 23
0
    static void TestFoo()
    {
        var spec = new MySpec();

        var root = new Racr.AstNode(spec, "A",
                                    new Racr.AstList(
                                        new B(spec, "abc"),
                                        new B(spec, "123"),
                                        new B(spec, "xyz")),
                                    new Racr.AstNode(spec, "C"),
                                    "hiya");


        root.ForEachChild((i, o) => {
            var node = o as Racr.AstNode;
            if (node != null)
            {
                Console.WriteLine("{0}: {1}", i, node.NodeType());
            }
            else
            {
                Console.WriteLine("{0}: {1}", i, o);
            }
        }, new Racr.Range(2));


        Console.WriteLine("---");


        Console.WriteLine("M: {0}", root.M());
        Console.WriteLine("N: {0}", root.N());

        Console.WriteLine("a: {0}", root.AttValue("a"));
        Console.WriteLine("b: {0}", root.AttValue("b", 3));

        Console.WriteLine("kids: {0}", root.AttValue("kids"));
        var index = root.GetList().Child(1).AttValue <int>("bar", 3);

        Console.WriteLine("index: {0}", index);


        Console.WriteLine("---");


        var c = root.FindChild((i, o) => {
            return(i == 2);
        }) as Racr.AstNode;

        Console.WriteLine("{0}", c.NodeType());


        Console.WriteLine("---");

        Console.WriteLine(root);
        Console.WriteLine("NodeType: {0}", root.NodeType());
        Console.WriteLine("IsNode: {0}", root.IsNode());
        Console.WriteLine("HasParent: {0}", root.HasParent());
        Console.WriteLine("NumChildren: {0}", root.NumChildren());
        Console.WriteLine("HasChild 'B: {0}", root.HasChild("B"));
        Console.WriteLine("HasChild 'List: {0}", root.HasChild("List"));

        Console.WriteLine("");

        var child = root.GetList();

        Console.WriteLine(child);
        Console.WriteLine("Child 1 -> t: {0}", child.Child(1).GetT());
        Console.WriteLine("IsNode: {0}", child.IsNode());
        Console.WriteLine("HasParent: {0}", child.HasParent());
        Console.WriteLine("ChildIndex: {0}", child.ChildIndex());
        Console.WriteLine("NumChildren: {0}", child.NumChildren());
    }
Ejemplo n.º 24
0
 public static bool IsErrorQuestion(this Racr.AstNode n)
 {
     return(n.AttValue <bool>("IsErrorQuestion"));
 }
Ejemplo n.º 25
0
 public static double Eval(this Racr.AstNode n)
 {
     return(n.AttValue <double>("Eval"));
 }
Ejemplo n.º 26
0
 public static bool IsActive(this Racr.AstNode n)
 {
     return(n.AttValue <bool>("IsActive"));
 }
Ejemplo n.º 27
0
 static Box Widget(this Ast n)
 {
     return(n.AttValue <Box>("Widget"));
 }
Ejemplo n.º 28
0
    // Attribute Accessors:

    static QDialog Dialog(this Ast n)
    {
        return(n.AttValue <QDialog>("Dialog"));
    }
Ejemplo n.º 29
0
 public static ValueTypes Type(this Racr.AstNode n)
 {
     return(n.AttValue <ValueTypes>("Type"));
 }
Ejemplo n.º 30
0
 static bool Render(this Ast n)
 {
     return(n.AttValue <bool>("Render"));
 }
Ejemplo n.º 31
0
 public static string SExpr(this Ast n)
 {
     return(n.AttValue <string>("SExpr"));
 }