Java Code Examples for skadistats.clarity.source.Source#readEngineType()

The following examples show how to use skadistats.clarity.source.Source#readEngineType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SimpleRunner.java    From clarity with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public SimpleRunner(Source s) throws IOException {
    super(s, s.readEngineType());
    this.loopController = new LoopController(controllerFunc);
}
 
Example 2
Source File: ControllableRunner.java    From clarity with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public ControllableRunner(Source s) throws IOException {
    super(s, s.readEngineType());
    upcomingTick = tick;
    wantedTick = tick;
    this.loopController = new LockingLoopController(normalLoopControl);
}
 
Example 3
Source File: Clarity.java    From clarity with BSD 3-Clause "New" or "Revised" License 3 votes vote down vote up
/**
 * Retrieves summary-data from the given input source
 *
 * @param source the {@code Source} providing the replay data
 * @return the {@code CDemoFileInfo} protobuf message
 * @throws IOException if the given source is invalid
 * @see Source
 */
public static Demo.CDemoFileInfo infoForSource(final Source source) throws IOException {
    EngineType engineType = source.readEngineType();
    source.setPosition(source.readFixedInt32());
    PacketInstance<GeneratedMessage> pi = engineType.getNextPacketInstance(source);
    return (Demo.CDemoFileInfo) pi.parse();
}