Skip to content

Commit

Permalink
Remove IOEndless
Browse files Browse the repository at this point in the history
  • Loading branch information
Piemontez committed Apr 30, 2024
1 parent e390e14 commit f075f18
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 18 deletions.
2 changes: 0 additions & 2 deletions src/core/types/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ export type CVFNodeData = {
processor: CVFNodeProcessor;
};

export class EmptyNodeProcessor extends CVFNodeProcessor {}

/**
* Definição dos nós vinculados ao React-Flow-Renderes
* Classe utilizada internamente
Expand Down
11 changes: 3 additions & 8 deletions src/ide/types/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { NodeSizes } from '../../core/config/sizes';
import GCStore from '../../core/contexts/GCStore';
import { SourceHandle, TargetHandle } from '../../core/types/handle';
import { ComponentMenuAction, MenuWithElementTitleProps } from './menu';
import { CVFNodeData, CVFNodeProcessor, EmptyNodeProcessor } from '../../core/types/node';
import { CVFNodeData, CVFNodeProcessor } from '../../core/types/node';

type OCVComponentProps = {
id: string;
Expand All @@ -30,6 +30,8 @@ export enum CVFComponentOptions {
NEXT_OPTION_01 = 4,
}

class EmptyNodeProcessor extends CVFNodeProcessor {}

/**
* Componente/NodeType
*/
Expand Down Expand Up @@ -170,10 +172,3 @@ export abstract class CVFIOComponent extends CVFComponent {
// Conexões que o componente irá disparar
sources: SourceHandle[] = [{ title: 'out', position: Position.Right }];
}

export abstract class CVFIOEndlessComponent extends CVFComponent {
// Conexões que o componente irá receber
targets: TargetHandle[] = [{ title: 'src1', position: Position.Left }];
// Conexões que o componente irá disparar
sources: SourceHandle[] = [{ title: 'out', position: Position.Right }];
}
4 changes: 2 additions & 2 deletions src/plugins/opencv/arithmetic/CVDivisionComponent.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import cv, { Mat } from 'opencv-ts';
import { Position } from 'reactflow';
import GCStore from '../../../core/contexts/GCStore';
import { CVFIOEndlessComponent } from '../../../ide/types/component';
import { CVFIOComponent } from '../../../ide/types/component';
import { TargetHandle } from '../../../core/types/handle';
import { CVFNodeProcessor } from '../../../core/types/node';
import { arithmeticTabName } from './tabname';


export class CVDivisionComponent extends CVFIOEndlessComponent {
export class CVDivisionComponent extends CVFIOComponent {
static menu = { tabTitle: arithmeticTabName, title: 'Divide' };
targets: TargetHandle[] = [
{ title: 'src1', position: Position.Left },
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/opencv/arithmetic/CVMulComponent.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Mat } from 'opencv-ts';
import { Position } from 'reactflow';
import GCStore from '../../../core/contexts/GCStore';
import { CVFIOEndlessComponent } from '../../../ide/types/component';
import { CVFIOComponent } from '../../../ide/types/component';
import { TargetHandle } from '../../../core/types/handle';
import { CVFNodeProcessor } from '../../../core/types/node';
import { arithmeticTabName } from './tabname';


export class CVMulComponent extends CVFIOEndlessComponent {
export class CVMulComponent extends CVFIOComponent {
static menu = { tabTitle: arithmeticTabName, title: 'Mul' };
targets: TargetHandle[] = [
{ title: 'src1', position: Position.Left },
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/opencv/arithmetic/CVMultiplyComponent.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import cv, { Mat } from 'opencv-ts';
import { Position } from 'reactflow';
import GCStore from '../../../core/contexts/GCStore';
import { CVFIOEndlessComponent } from '../../../ide/types/component';
import { CVFIOComponent } from '../../../ide/types/component';
import { TargetHandle } from '../../../core/types/handle';
import { CVFNodeProcessor } from '../../../core/types/node';
import { arithmeticTabName } from './tabname';


export class CVMultiplyComponent extends CVFIOEndlessComponent {
export class CVMultiplyComponent extends CVFIOComponent {
static menu = { tabTitle: arithmeticTabName, title: 'Multiply' };
targets: TargetHandle[] = [
{ title: 'src1', position: Position.Left },
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/opencv/others/EqualizeHistComponent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CVFIOEndlessComponent } from '../../../ide/types/component';
import { CVFIOComponent } from '../../../ide/types/component';
import { CVFNodeProcessor } from '../../../core/types/node';
import cv from 'opencv-ts';
import GCStore from '../../../core/contexts/GCStore';
Expand All @@ -8,7 +8,7 @@ import { othersTabName } from './tabname';
* Equalize Hist component and node
*/

export class EqualizeHistComponent extends CVFIOEndlessComponent {
export class EqualizeHistComponent extends CVFIOComponent {
static menu = { tabTitle: othersTabName, title: 'Equalize Hist' };
static processor = class EqualizeHistNode extends CVFNodeProcessor {
async proccess() {
Expand Down

0 comments on commit f075f18

Please sign in to comment.