SCViewer/plugins/com.minres.scviewer.databas.../src/com/minres/scviewer/database/text/TxGenerator.java

55 lines
1.4 KiB
Java
Raw Normal View History

/*******************************************************************************
* 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;
import java.util.ArrayList;
import java.util.List;
import com.minres.scviewer.database.IWaveform;
import com.minres.scviewer.database.tx.ITxGenerator;
2021-01-09 10:34:22 +01:00
class TxGenerator extends AbstractTxStream implements ITxGenerator {
2021-01-09 10:34:22 +01:00
TxStream stream;
2021-01-08 20:31:24 +01:00
2021-01-03 17:44:52 +01:00
List<TxAttributeType> beginAttrs = new ArrayList<>();
2021-01-03 17:44:52 +01:00
List<TxAttributeType> endAttrs= new ArrayList<>();
2021-01-09 10:34:22 +01:00
TxGenerator(TextDbLoader loader, Long id, String name, TxStream stream){
super(loader, id, name);
this.stream=stream;
}
@Override
public IWaveform getStream(){
return stream;
}
@Override
2021-01-09 10:34:22 +01:00
public boolean isSame(IWaveform other) {
return(other instanceof TxGenerator && this.getId().equals(other.getId()));
}
2021-01-09 10:34:22 +01:00
public List<TxAttributeType> getBeginAttrs() {
return beginAttrs;
}
public List<TxAttributeType> getEndAttrs() {
return endAttrs;
}
2021-01-09 10:34:22 +01:00
@Override
public String getKind() {
return stream.getKind();
}
}