Exemple #1
0
        public void RemoveProgramCheck(FLProgramCheck check)
        {
            if (IsAttached)
            {
                return;
            }

            ProgramChecks.Remove(check);
        }
Exemple #2
0
        public void RemoveAllProgramChecks()
        {
            if (IsAttached)
            {
                return;
            }

            ProgramChecks.Clear();
        }
Exemple #3
0
        public void AddProgramCheck(FLProgramCheck check)
        {
            if (IsAttached)
            {
                return;
            }

            if (!ProgramChecks.Contains(check))
            {
                ProgramChecks.Add(check);
            }
        }
Exemple #4
0
 public FLScriptRunner(
     CLAPI instance, DataVectorTypes dataVectorTypes = DataVectorTypes.Uchar1,
     string kernelFolder = "resources/kernel")
 {
     Db             = new KernelDatabase(instance, kernelFolder, dataVectorTypes);
     InstructionSet = FLInstructionSet.CreateWithBuiltInTypes(Db);
     BufferCreator  = BufferCreator.CreateWithBuiltInTypes();
     ProgramChecks  = FLProgramCheckBuilder.CreateDefaultCheckBuilder(InstructionSet, BufferCreator);
     Parser         = new FLParser(InstructionSet, BufferCreator);
     ProgramChecks.Attach(Parser, true);
     Instance     = instance;
     ProcessQueue = new Queue <FlScriptExecutionContext>();
 }
Exemple #5
0
        public void AddProgramCheck(FLProgramCheck check)
        {
            if (IsAttached || ProgramChecks.Any(x => x.GetType() == check.GetType()))
            {
                return;
            }

            if (!ProgramChecks.Contains(check))
            {
                ProgramChecks.Add(check);
                ProgramChecks.Sort((x, y) => y.Priority.CompareTo(x.Priority));
            }
        }