Skip to content

CVFilter

Divided by Zer0 edited this page Mar 9, 2022 · 2 revisions

CVFilter

Extends: Reference

Description

This class stores a filter for the Card Viewer and is responsible for doing comparisons of expressions

Property Descriptions

property

var property: String
  • Setter: set_property

The property of a card this filter is checking against

operator

var operator: String
  • Setter: set_operator

The property of a card this filter is checking against an operator is either:

  • : – equals
  • ! – different from
  • < – less than
  • – more than

expression

var expression
  • Setter: set_expression

The property of a card this filter is checking against an operator is either:

  • : – equals
  • ! – different from
  • < – less than
  • – more than The expression can either be a integer, or a regex

type

var type: String

The property of a card this filter is checking against an operator is either:

  • : – equals
  • ! – different from
  • < – less than
  • – more than The expression can either be a integer, or a regex The type of filter this is. It will only be an int, if the property being compared is a number

Method Descriptions

set_property

func set_property(value) -> void

Setter for property var

set_operator

func set_operator(value) -> void

Setter for operator var

set_expression

func set_expression(value: String) -> void

Setter for expression var

assess_card_object

func assess_card_object(card_object: CVListCardObject) -> bool

Compares the provided DBListCardObject against this filter

Returns true if this filter matches the card_properties, else returns false

compare_regex

func compare_regex(value) -> bool

Compares regex based on the operator provided to this filter

Clone this wiki locally