Click here to Skip to main content
15,896,557 members
Articles / Web Development / HTML

Logician: A Table-based Rules Engine Suite in C++/.NET/JavaScript using XML

Rate me:
Please Sign up or sign in to vote.
4.90/5 (52 votes)
8 Mar 2017GPL314 min read 104.4K   6.8K   173  
Overview of a cross-platform spreadsheet-based rules enigne with algorithms implemented in C++ and JavaScript, and wrappers to C#/.NET/WinRT
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Xml;
using System.Xml.Linq;
using ROMNET;

namespace LogicianDebuggerTestApp2012
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            SetupApplication();
        }

        private void SetupApplication()
        {
            try
            {
                ROMNode node = ROMNode.LoadXML("config.xml", null);
                if (node == null)
                    return;

                ROMNode childNode = new ROMNode("Child1");
                childNode.SetAttribute("attr1", "A child attr");
                node.AddChildROMObject(childNode);
                ROMNode childNode2 = new ROMNode("Child2");
                childNode2.SetAttribute("attr2", "A child attr");
                node.AddChildROMObject(childNode2);
                ROMNode childNode3 = new ROMNode("Child3");
                childNode3.SetAttribute("attr3", "A child attr");
                childNode3.SetAttribute("attr3", "attrSub1", "A sub child attr");
                childNode3.SetAttribute("attr3", "attrSub2", "A 2nd sub child attr");
                childNode2.AddChildROMObject(childNode3);

                Debugger.RootNode = node;
                Debugger.Update();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer (Senior)
United States United States
I have extensive experience developing software on both Linux and Windows in C++ and Python. I have also done a lot of work in the C#/.NET ecosystem. I currently work in the fields of robotics and machine learning, and also have a strong background in business automation/rules engines.

Comments and Discussions