SCViewer/com.minres.scviewer.databas.../src/com/minres/scviewer/database/text/TxGenerator.groovy

53 lines
1.5 KiB
Groovy
Raw Normal View History

2012-06-17 20:34:50 +02:00
/*******************************************************************************
* Copyright (c) 2012 IT Just working.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IT Just working - initial API and implementation
*******************************************************************************/
package com.minres.scviewer.database.text
2012-06-17 19:53:05 +02:00
import java.util.ArrayList;
import java.util.List;
2015-01-06 17:14:16 +01:00
import com.minres.scviewer.database.ITxAttributeType
import com.minres.scviewer.database.ITxAttribute;
import com.minres.scviewer.database.ITxEvent;
2015-01-06 17:14:16 +01:00
import com.minres.scviewer.database.ITxGenerator;
import com.minres.scviewer.database.ITxStream;
import com.minres.scviewer.database.ITx;
import com.minres.scviewer.database.IWaveformEvent;
2012-06-17 19:53:05 +02:00
2015-01-06 17:14:16 +01:00
class TxGenerator implements ITxGenerator{
2012-06-17 19:53:05 +02:00
Long id
2015-01-06 17:14:16 +01:00
TxStream stream
2012-06-17 19:53:05 +02:00
String name
Boolean active = false
2015-01-06 17:14:16 +01:00
ArrayList<ITx> transactions=[]
2012-06-17 19:53:05 +02:00
2015-01-06 17:14:16 +01:00
ArrayList<ITxAttributeType> begin_attrs = []
2012-06-17 19:53:05 +02:00
int begin_attrs_idx = 0
2015-01-06 17:14:16 +01:00
ArrayList<ITxAttributeType> end_attrs= []
2012-06-17 19:53:05 +02:00
int end_attrs_idx = 0
2015-01-06 17:14:16 +01:00
TxGenerator(int id, TxStream stream, name){
2012-06-17 19:53:05 +02:00
this.id=id
this.stream=stream
this.name=name
}
ITxStream<? extends ITxEvent> getStream(){
2012-06-17 19:53:05 +02:00
return stream;
}
2015-01-06 17:14:16 +01:00
List<ITx> getTransactions(){
2012-06-17 19:53:05 +02:00
return transactions
}
Boolean isActive() {return active};
}