Esempio n. 1
0
File: Form1.cs Progetto: vi34/fb2smv
        private void variablesTreeView_AfterSelect(object sender, TreeViewEventArgs e)
        {
            connectedVarsTreeView.Nodes.Clear();
            _selectedVariable = _parcer.Storage.Variables.FirstOrDefault(v => v.FBType == _selectedFbType && v.Name == variablesTreeView.SelectedNode.Name);
            if (_selectedVariable != null)
            {
                varNameTextBox.Text      = _selectedVariable.Name;
                varTypeTextBox.Text      = _selectedVariable.Type;
                varArraySizeTextBox.Text = Convert.ToString(_selectedVariable.ArraySize);
                varRangeTextBox.Text     = _selectedVariable.SmvType.ToString();

                _connectedVars = varDependencyGraph.GetConnectedVariables(VarDependencyGraph.VariableKey(_selectedVariable));

                varIsConstantCheckBox.Checked = _selectedVariable.IsConstant;

                FBType selType = _parcer.Storage.Types.FirstOrDefault(t => t.Name == _selectedFbType);
                if (selType.Type == FBClass.Basic && _selectedVariable.Direction == Direction.Input && _connectedVars.Count() == 0)
                {
                    varIsConstantCheckBox.Enabled = true;
                }
                else
                {
                    varIsConstantCheckBox.Enabled = false;
                }

                foreach (Variable connectedVar in _connectedVars)
                {
                    connectedVarsTreeView.Nodes.Add(connectedVar.ToString(), connectedVar.ToString());
                }
            }
        }
Esempio n. 2
0
File: Form1.cs Progetto: vi34/fb2smv
        private void saveProjectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FBType rootFbType = _parcer.Storage.Types.FirstOrDefault(t => t.IsRoot);

            if (rootFbType == null)
            {
                Program.ErrorMessage(Messages.No_FB_System_Loaded_Message_);
                return;
            }
            saveFileDialogProject.FileName = rootFbType.Name + projectFileExtension;
            if (saveFileDialogProject.ShowDialog() == DialogResult.OK)
            {
                ProjectFileStructure s = new ProjectFileStructure();
                s.ExecutionModels = _executionModels;
                s.Storage         = _parcer.Storage;

                FileStream      fs         = new FileStream(saveFileDialogProject.FileName, FileMode.Create);
                BinaryFormatter serializer = new BinaryFormatter();
                //try
                //{
                serializer.Serialize(fs, s);
                //}

                /*if (saveFileDialogProject.ShowDialog() == DialogResult.OK)
                 * {
                 *
                 * }*/
            }
        }
Esempio n. 3
0
 public int fbTypeCompare(FBType a, FBType b)
 {
     if (a.Type < b.Type)
     {
         return(-1);
     }
     else if (a.Type > b.Type)
     {
         return(1);
     }
     else
     {
         return(0);
     }
 }
Esempio n. 4
0
            public string TranslateCompositeFB(FBType fbType)
            {
                string         smvModule          = "";
                ExecutionModel executionModel     = _executionModels.FirstOrDefault(em => em.FBTypeName == fbType.Name);
                var            events             = _storage.Events.Where(ev => ev.FBType == fbType.Name);
                var            variables          = _storage.Variables.Where(ev => ev.FBType == fbType.Name);
                var            instances          = _storage.Instances.Where(inst => inst.FBType == fbType.Name);
                var            withConnections    = _storage.WithConnections.Where(conn => conn.FBType == fbType.Name);
                var            connections        = _storage.Connections.Where(conn => conn.FBType == fbType.Name);
                var            instanceParameters = _storage.InstanceParameters.Where(p => p.FBType == fbType.Name);

                IDispatcher dispatcher = executionModel.Dispatcher;

                //smvModule += _moduleHeader(events, variables, fbType.Name) + "\n";
                smvModule += FbSmvCommon.SmvModuleDeclaration(events, variables, fbType.Name);
                smvModule += CompositeFbSmv.FbInstances(instances, _storage.Events, _storage.Variables, connections, _settings) + "\n";
                smvModule += CompositeFbSmv.InternalBuffersDeclaration(instances, connections, _storage.Events, _storage.Variables) + "\n";
                smvModule += Smv.Assign;
                smvModule += CompositeFbSmv.InternalBuffersInitialization(instances, connections, _storage.Events, _storage.Variables, instanceParameters) + "\n";

                if (_settings.UseProcesses)
                {
                    smvModule += CompositeFbSmv.NonConnectedInstanceOutputEvents(_storage.Events, instances, connections);
                    smvModule += CompositeFbSmv.ComponentDataOutputNextStatements(_storage.Variables, instances);
                }
                //smvModule += _moduleVariablesInitBlock(variables) + "\n";
                //smvModule += _inputVariablesSampleComposite(variables, withConnections) + "\n";
                smvModule += CompositeFbSmv.NonConnectedEventInputs(connections, _storage.Events, instances, _showMessage);
                smvModule += CompositeFbSmv.NonConnectedInputs(connections, _storage.Variables, instances);
                smvModule += CompositeFbSmv.InternalDataConnections(connections, withConnections, _storage.Variables, instances) + "\n";
                smvModule += CompositeFbSmv.ComponentEventOutputs(connections, _settings.UseProcesses) + "\n";
                //smvModule += _eventInputsResetRules(events) + "\n";
                smvModule += "\n-- ---DISPATCHER--- --\n";
                smvModule += "-- *************** --\n";
                smvModule += dispatcher.GetSmvCode(_settings.UseProcesses) + "\n";

                smvModule += CompositeFbSmv.InternalEventConnections(connections, _settings.UseProcesses) + "\n";
                smvModule += CompositeFbSmv.InputEventsResetRules(events, _settings.UseProcesses);
                smvModule += FbSmvCommon.DefineExistsInputEvent(events) + "\n";
                smvModule += CompositeFbSmv.DefineOmega(connections) + "\n";
                smvModule += CompositeFbSmv.DefinePhi(instances, _storage.Events) + "\n"; //phi variable for timed models

                smvModule += FbSmvCommon.ModuleFooter(_settings) + "\n";
                //smvModule += Smv.AlphaBetaRules;

                return(smvModule);
            }
Esempio n. 5
0
 public string TranslateLibraryFBType(FBType fbType)
 {
     if (fbType.Name == LibraryTypes.E_SPLIT)
     {
         return(LibraryFBTypes.ESplitFBModule(_storage, _settings));
     }
     if (fbType.Name == LibraryTypes.E_DELAY)
     {
         return(LibraryFBTypes.EDelayFBModule(_storage, _settings));
     }
     else if (fbType.Name == LibraryTypes.E_CYCLE)
     {
         return(LibraryFBTypes.ECycleFBModule(_storage, _settings));
     }
     _showMessage(String.Format("Warning! Library type {0} is not supported for current execution model. Dummy FB module was generated.", fbType.Name));
     return(emptyFbModule(fbType.Name));
 }
Esempio n. 6
0
            public string TranslateBasicFB(FBType fbType, bool eventSignalResetSolve = true, bool showUnconditionalTransitions = false)
            {
                string smvModule = "";

                ExecutionModel executionModel  = _executionModels.FirstOrDefault(em => em.FBTypeName == fbType.Name);
                var            events          = _storage.Events.Where(ev => ev.FBType == fbType.Name);
                var            variables       = _storage.Variables.Where(ev => ev.FBType == fbType.Name);
                var            states          = _storage.EcStates.Where(ev => ev.FBType == fbType.Name);
                var            algorithms      = _storage.Algorithms.Where(alg => alg.FBType == fbType.Name && alg.Language == AlgorithmLanguages.ST);
                var            smvAlgs         = _translateAlgorithms(algorithms);
                var            actions         = _storage.EcActions.Where(act => act.FBType == fbType.Name);
                var            withConnections = _storage.WithConnections.Where(conn => conn.FBType == fbType.Name);
                var            transitions     = _storage.EcTransitions.Where(tr => tr.FBType == fbType.Name);

                smvModule += BasicFbSmv.ModuleHeader(events, variables, fbType.Name);

                smvModule += BasicFbSmv.OsmStatesDeclaration();
                smvModule += BasicFbSmv.EccStatesDeclaration(states) + "\n";
                smvModule += BasicFbSmv.EcActionsCounterDeclaration(states);
                smvModule += BasicFbSmv.AlgStepsCounterDeclaration(smvAlgs);

                smvModule += Smv.Assign;
                smvModule += String.Format(Smv.VarInitializationBlock, Smv.EccStateVar, Smv.EccState(states.First(s => true).Name));
                smvModule += String.Format(Smv.VarInitializationBlock, Smv.OsmStateVar, Smv.Osm.S0);
                smvModule += BasicFbSmv.ModuleVariablesInitBlock(variables) + "\n";
                smvModule += String.Format(Smv.VarInitializationBlock, Smv.EcActionsCounterVar, "0");
                smvModule += String.Format(Smv.VarInitializationBlock, Smv.AlgStepsCounterVar, "0");

                smvModule += BasicFbSmv.EcStateChangeBlock(transitions, events);
                smvModule += Smv.OsmStateChangeBlock + "\n";
                smvModule += BasicFbSmv.EcActionsCounterChangeBlock(states) + "\n";
                smvModule += BasicFbSmv.AlgStepsCounterChangeBlock(states, actions, smvAlgs) + "\n";

                smvModule += BasicFbSmv.InputVariablesSampleBasic(variables, withConnections) + "\n";
                smvModule += BasicFbSmv.OutputVariablesChangingRules(variables, actions, _storage.AlgorithmLines.Where(line => line.FBType == fbType.Name), _settings) + "\n";
                smvModule += BasicFbSmv.SetOutputVarBuffers(variables, events, actions, withConnections, _showMessage) + "\n";
                smvModule += BasicFbSmv.SetServiceSignals(_settings.UseProcesses) + "\n";

                smvModule += BasicFbSmv.EventInputsResetRules(events, executionModel, eventSignalResetSolve, _settings.UseProcesses) + "\n";
                smvModule += BasicFbSmv.OutputEventsSettingRules(events, actions, _settings.UseProcesses) + "\n";

                smvModule += BasicFbSmv.BasicModuleDefines(states, events, transitions, showUnconditionalTransitions) + "\n";

                smvModule += FbSmvCommon.ModuleFooter(_settings) + "\n";
                return(smvModule);
            }
Esempio n. 7
0
    public static void AddMetaData(System.Web.UI.Page pageEntity, string title, FBType type, string url, string imageUrl, string siteName, string description)
    {
        HtmlMeta metaTitle = new HtmlMeta();

        metaTitle.Attributes["property"] = "og:title";
        metaTitle.Content = title;
        pageEntity.Header.Controls.Add(metaTitle);

        HtmlMeta metaType = new HtmlMeta();

        metaType.Attributes["property"] = "og:type";
        metaType.Content = type.ToString().ToLower();
        pageEntity.Header.Controls.Add(metaType);

        HtmlMeta metaUrl = new HtmlMeta();

        metaUrl.Attributes["property"] = "og:url";
        metaUrl.Content = url;
        pageEntity.Header.Controls.Add(metaUrl);

        HtmlMeta metaImage = new HtmlMeta();

        metaImage.Attributes["property"] = "og:image";
        metaImage.Content = string.IsNullOrEmpty(imageUrl) ? Helpers.RootPath + Globals.Settings.MissingImagePath : imageUrl.Replace("~/", Helpers.RootPath);
        pageEntity.Header.Controls.Add(metaImage);

        HtmlMeta metaSiteName = new HtmlMeta();

        metaSiteName.Attributes["property"] = "og:site_name";
        metaSiteName.Content = siteName;
        pageEntity.Header.Controls.Add(metaSiteName);

        HtmlMeta metaDescription = new HtmlMeta();

        metaDescription.Attributes["property"] = "og:description";
        metaDescription.Content = description;
        pageEntity.Header.Controls.Add(metaDescription);

        HtmlMeta metaFBAdmins = new HtmlMeta();

        metaFBAdmins.Attributes["property"] = "fb:admins";
        metaFBAdmins.Content = Globals.Settings.FacebookAdminIDs;
        pageEntity.Header.Controls.Add(metaFBAdmins);
    }
Esempio n. 8
0
 public static Offset <Field> CreateField(FlatBufferBuilder builder,
                                          StringOffset nameOffset = default(StringOffset),
                                          bool nullable           = false,
                                          FBType type_type        = FBType.NONE,
                                          int typeOffset          = 0,
                                          Offset <DictionaryEncoding> dictionaryOffset = default(Offset <DictionaryEncoding>),
                                          VectorOffset childrenOffset        = default(VectorOffset),
                                          VectorOffset custom_metadataOffset = default(VectorOffset))
 {
     builder.StartObject(7);
     Field.AddCustomMetadata(builder, custom_metadataOffset);
     Field.AddChildren(builder, childrenOffset);
     Field.AddDictionary(builder, dictionaryOffset);
     Field.AddType(builder, typeOffset);
     Field.AddName(builder, nameOffset);
     Field.AddTypeType(builder, type_type);
     Field.AddNullable(builder, nullable);
     return(Field.EndField(builder));
 }
Esempio n. 9
0
 public string translateFB(FBType fbType)
 {
     if (fbType.Type == FBClass.Basic)
     {
         return(TranslateBasicFB(fbType));
     }
     else if (fbType.Type == FBClass.Composite)
     {
         return(TranslateCompositeFB(fbType));
     }
     else if (fbType.Type == FBClass.Library)
     {
         return(TranslateLibraryFBType(fbType));
     }
     else
     {
         throw new Exception("Unsupported FB class! " + fbType.Type);
     }
 }
Esempio n. 10
0
File: Form1.cs Progetto: vi34/fb2smv
        private void fbTypesView_AfterSelect(object sender, TreeViewEventArgs e)
        {
            _selectedFbType = fbTypesView.SelectedNode.Text;
            groupBox1.Text  = _selectedFbType;
            IEnumerable <Variable> vars   = _parcer.Storage.Variables.Where(v => v.FBType == _selectedFbType);
            IEnumerable <Event>    events = _parcer.Storage.Events.Where(ev => ev.FBType == _selectedFbType);

            fillVarTreeView(vars);
            fillEventsTreeView(events);

            FBType selectedFb = _parcer.Storage.Types.FirstOrDefault((fbType) => fbType.Name == _selectedFbType);

            groupBox2.Text = _selectedFbType;

            if (selectedFb.Type == FBClass.Composite)
            {
                //Instance order
                groupBox2.Enabled = true;
                cyclicDispatcherRadioButton.Select();
                _currentDisp = _executionModels.FirstOrDefault((em) => em.FBTypeName == _selectedFbType).Dispatcher;
                _fillInstanceList();

                //Events priority
                groupBox4.Enabled = false;
            }
            else
            {
                //Instance order
                instancePriorityListBox.Items.Clear();
                _currentDisp      = null;
                groupBox2.Enabled = false;

                //Events priority
                groupBox4.Enabled = true;
                fillEventsPriorityList();
            }
        }
Esempio n. 11
0
            public string TranslateCompositeFB(FBType fbType)
            {
                string smvModule = "";

                var events = _storage.Events.Where(ev => ev.FBType == fbType.Name);
                var variables = _storage.Variables.Where(ev => ev.FBType == fbType.Name);
                var instances = _storage.Instances.Where(inst => inst.FBType == fbType.Name);
                var withConnections = _storage.WithConnections.Where(conn => conn.FBType == fbType.Name);
                var internalBuffers = _storage.Connections.Where(conn => conn.FBType == fbType.Name);

                bool solveDispatchingProblem = true;
                IDispatcher dispatcher = new CyclicDispatcher(instances, solveDispatchingProblem);

                //smvModule += _moduleHeader(events, variables, fbType.Name) + "\n";
                smvModule += FbSmvCommon.SmvModuleDeclaration(events, variables, fbType.Name);
                smvModule += CompositeFbSmv.FbInstances(instances, _storage.Events, _storage.Variables) + "\n";
                smvModule += CompositeFbSmv.InternalBuffersDeclaration(instances, _storage.Events, _storage.Variables) + "\n";
                smvModule += Smv.Assign;
                smvModule += CompositeFbSmv.InternalBuffersInitialization(instances, _storage.Events, _storage.Variables) + "\n";
                //smvModule += _moduleVariablesInitBlock(variables) + "\n";
                //smvModule += _inputVariablesSampleComposite(variables, withConnections) + "\n";
                smvModule += CompositeFbSmv.InternalEventConnections(internalBuffers) + "\n";
                smvModule += CompositeFbSmv.InternalDataConnections(internalBuffers, withConnections) + "\n";
                smvModule += CompositeFbSmv.ResetComponentEventOutputs(internalBuffers) + "\n";
                //smvModule += _eventInputsResetRules(events) + "\n";
                smvModule += CompositeFbSmv.InputEventsResetRules(events);
                smvModule += "\n-- ---DISPATCHER--- --\n";
                smvModule += "-- *************** --\n";
                smvModule += dispatcher.GetSmvCode() + "\n";

                smvModule += FbSmvCommon.DefineExistsInputEvent(events) + "\n";
                smvModule += CompositeFbSmv.DefineOmega(internalBuffers) + "\n";
                smvModule += FbSmvCommon.ModuleFooter() + "\n";
                //smvModule += Smv.AlphaBetaRules;

                return smvModule;
            }
Esempio n. 12
0
 public void PutFBType(FBType fbType)
 {
     Types.Add(fbType);
 }
Esempio n. 13
0
            public string TranslateBasicFB(FBType fbType, bool eventSignalResetSolve = true, bool showUnconditionalTransitions = false)
            {
                string smvModule = "";

                var events = _storage.Events.Where(ev => ev.FBType == fbType.Name);
                var variables = _storage.Variables.Where(ev => ev.FBType == fbType.Name);
                var states = _storage.EcStates.Where(ev => ev.FBType == fbType.Name);
                var algorithms = _storage.Algorithms.Where(alg => alg.FBType == fbType.Name && alg.Language == AlgorithmLanguages.ST);
                var smvAlgs = _translateAlgorithms(algorithms);
                var actions = _storage.EcActions.Where(act => act.FBType == fbType.Name);
                var withConnections = _storage.WithConnections.Where(conn => conn.FBType == fbType.Name);
                var transitions = _storage.EcTransitions.Where(tr => tr.FBType == fbType.Name);

                smvModule += BasicFbSmv.ModuleHeader(events, variables, fbType.Name);

                smvModule += BasicFbSmv.OsmStatesDeclaration();
                smvModule += BasicFbSmv.EccStatesDeclaration(states) + "\n";
                smvModule += BasicFbSmv.EcActionsCounterDeclaration(states);
                smvModule += BasicFbSmv.AlgStepsCounterDeclaration(smvAlgs);

                smvModule += Smv.Assign;
                smvModule += String.Format(Smv.VarInitializationBlock, Smv.EccStateVar, Smv.EccState(states.First(s => true).Name));
                smvModule += String.Format(Smv.VarInitializationBlock, Smv.OsmStateVar, Smv.Osm.S0);
                smvModule += BasicFbSmv.ModuleVariablesInitBlock(variables) + "\n";
                smvModule += String.Format(Smv.VarInitializationBlock, Smv.EcActionsCounterVar, "0");
                smvModule += String.Format(Smv.VarInitializationBlock, Smv.AlgStepsCounterVar, "0");

                smvModule += BasicFbSmv.EcStateChangeBlock(transitions, events);
                smvModule += Smv.OsmStateChangeBlock + "\n";
                smvModule += BasicFbSmv.EcActionsCounterChangeBlock(states) + "\n";
                smvModule += BasicFbSmv.AlgStepsCounterChangeBlock(states, actions, smvAlgs) + "\n";
                smvModule += BasicFbSmv.EventInputsResetRules(events, eventSignalResetSolve) + "\n";
                smvModule += BasicFbSmv.InputVariablesSampleBasic(variables, withConnections) + "\n";
                smvModule += BasicFbSmv.OutputVariablesChangingRules(variables, actions, _storage.AlgorithmLines.Where(line => line.FBType == fbType.Name)) + "\n";
                smvModule += BasicFbSmv.OutputEventsSettingRules(events, actions) + "\n";
                smvModule += BasicFbSmv.SetOutputVarBuffers(variables, events, actions, withConnections) + "\n";
                smvModule += BasicFbSmv.SetServiceSignals() + "\n";
                smvModule += BasicFbSmv.BasicModuleDefines(states, events, transitions, showUnconditionalTransitions) + "\n";
                smvModule += FbSmvCommon.ModuleFooter() + "\n";
                return smvModule;
            }
Esempio n. 14
0
 public string translateFB(FBType fbType)
 {
     if (fbType.Type == FBClass.Basic) return TranslateBasicFB(fbType);
     else return TranslateCompositeFB(fbType);
 }
Esempio n. 15
0
            public string GenerateMain()
            {
                string mainModule     = "";
                FBType topLevelFbType = _storage.Types.FirstOrDefault(fbType => fbType.IsRoot);

                if (topLevelFbType == null)
                {
                    throw new ArgumentNullException("Can't find root FB type");
                }

                List <FBInstance>        instanceList       = new List <FBInstance>();
                List <Connection>        connections        = new List <Connection>();
                List <InstanceParameter> instanceParameters = new List <InstanceParameter>();
                FBInstance instance = new FBInstance(topLevelFbType.Name + "_inst", topLevelFbType.Name, "Top-level FB instance", "main");

                instanceList.Add(instance);

                mainModule += String.Format(Smv.ModuleDef, "main", "");
                mainModule += CompositeFbSmv.FbInstances(instanceList, _storage.Events, _storage.Variables, connections, _settings) + "\n";
                mainModule += CompositeFbSmv.InternalBuffersDeclaration(instanceList, connections, _storage.Events, _storage.Variables) + "\n";
                if (_settings.GenerateDummyProperty)
                {
                    mainModule += String.Format(Smv.VarDeclarationBlock, "false_var", Smv.DataTypes.BoolType);
                }
                mainModule += Smv.Assign;
                if (_settings.GenerateDummyProperty)
                {
                    mainModule += String.Format(Smv.VarInitializationBlock, "false_var", Smv.False);
                    mainModule += String.Format(Smv.NextVarAssignment, "false_var", Smv.False);
                }
                mainModule += CompositeFbSmv.InternalBuffersInitialization(instanceList, connections, _storage.Events, _storage.Variables, instanceParameters, true) + "\n";

                mainModule += String.Format(Smv.VarInitializationBlock, instance.Name + "_" + Smv.Alpha, Smv.True);
                mainModule += String.Format(Smv.VarInitializationBlock, instance.Name + "_" + Smv.Beta, Smv.False);


                //Main module next blocks
                //**********************
                foreach (Variable variable in _storage.Variables.Where(v => v.FBType == topLevelFbType.Name && v.Direction == Direction.Input && !v.IsConstant))
                {
                    string smvVariable = instance.Name + "_" + variable.Name;
                    if (variable.ArraySize == 0)
                    {
                        mainModule += String.Format(Smv.NextVarAssignment, smvVariable, smvVariable);
                    }
                    else
                    {
                        for (int i = 0; i < variable.ArraySize; i++)
                        {
                            mainModule += String.Format(Smv.NextVarAssignment, smvVariable + Smv.ArrayIndex(i), smvVariable + Smv.ArrayIndex(i));
                        }
                    }
                }
                foreach (Event ev in _storage.Events.Where(ev => ev.FBType == topLevelFbType.Name))
                {
                    string smvVariable = instance.Name + "_" + ev.Name;
                    string nextRule    = "";
                    if (ev.Direction == Direction.Output)
                    {
                        nextRule = instance.Name + "." + "event_" + ev.Name + "_set : " + Smv.True + ";\n";
                    }
                    else
                    {
                        nextRule = instance.Name + "." + "event_" + ev.Name + "_reset : " + Smv.False + ";\n";
                    }
                    mainModule += String.Format(Smv.NextCaseBlock, smvVariable, nextRule);
                }

                string alphaRule = "\t" + instance.Name + "_" + Smv.Beta + " : " + Smv.True + ";\n" +
                                   "\t" + instance.Name + ".alpha_reset : " + Smv.False + ";\n";
                string betaRule = "\t" + instance.Name + "_" + Smv.Beta + " : " + Smv.False + ";\n" +
                                  "\t" + instance.Name + ".beta_set : " + Smv.True + ";\n";

                mainModule += String.Format(Smv.NextCaseBlock, instance.Name + "_" + Smv.Alpha, alphaRule);
                mainModule += String.Format(Smv.NextCaseBlock, instance.Name + "_" + Smv.Beta, betaRule);
                //**********************

                //mainModule += FbSmvCommon.ModuleFooter(_settings) + "\n";

                if (_settings.GenerateDummyProperty)
                {
                    mainModule += "\nLTLSPEC F false_var=TRUE";
                }

                return(mainModule);
            }
Esempio n. 16
0
 public int fbTypeCompare(FBType a, FBType b)
 {
     if (a.Type == FBClass.Basic && b.Type == FBClass.Composite) return -1;
     else if (a.Type == FBClass.Composite && b.Type == FBClass.Basic) return 1;
     else return 0;
 }
Esempio n. 17
0
 public static void AddTypeType(FlatBufferBuilder builder, FBType typeType)
 {
     builder.AddByte(2, (byte)typeType, 0);
 }