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

55 lines
1.6 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;
2018-08-27 23:10:52 +02:00
import org.apache.jdbm.DB
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
2018-08-27 23:10:52 +02:00
class TxGenerator implements ITxGenerator, Serializable{
2012-06-17 19:53:05 +02:00
Long id
2018-08-27 23:10:52 +02:00
Long stream_id
2012-06-17 19:53:05 +02:00
String name
2018-08-27 23:10:52 +02:00
TextDbLoader loader;
2012-06-17 19:53:05 +02:00
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
2018-08-27 23:10:52 +02:00
TxGenerator(TextDbLoader loader, Long id, Long stream_id, name){
2012-06-17 19:53:05 +02:00
this.id=id
2018-08-27 23:10:52 +02:00
this.stream_id=stream_id
2012-06-17 19:53:05 +02:00
this.name=name
2018-08-27 23:10:52 +02:00
this.loader=loader
2012-06-17 19:53:05 +02:00
}
ITxStream<? extends ITxEvent> getStream(){
2018-08-27 23:10:52 +02:00
return loader.streamsById[stream_id];
2012-06-17 19:53:05 +02:00
}
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};
}