IR_VisItControlCommandCallback.scala 861 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
package exastencils.visualization.ir.visit

import scala.collection.mutable.ListBuffer

import exastencils.base.ir._

/// IR_VisItControlCommandCallback
// implement functionality for the control buttons on the GUI

10
case class IR_VisItControlCommandCallback() extends IR_VisItFuturePlainFunction {
11
12
13
14

  override def generateFct() : IR_PlainFunction = {
    val fctBody = ListBuffer[IR_Statement]()

15
    val cmd = IR_VariableAccess("cmd", IR_SpecialDatatype("const char*"))
16

17
    fctBody += IR_VisItCommandHandling(cmd)
18
19
20
21

    IR_PlainFunction(
      name,
      IR_UnitDatatype,
22
      ListBuffer(IR_FunctionArgument(cmd), IR_FunctionArgument("args", IR_SpecialDatatype("const char*")), IR_FunctionArgument("cbdata", IR_PointerDatatype(IR_UnitDatatype))),
23
24
25
26
27
28
      fctBody
    )
  }

  override def name : String = "ControlCommandCallback"
}