public class FMUBuilder
extends java.lang.Object
Red (cxh) |
Red (cxh) |
Modifier and Type | Class and Description |
---|---|
private static class |
FMUBuilder._StreamReaderThread
Private class that reads a stream in a thread and updates the
the FMUBuilder.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
_appendToStderrAndStdout
If true, append to stderr and stdout as the commands are executed.
|
private static java.lang.String |
_eol
End of line character.
|
java.lang.StringBuffer |
buffer
The StringBuffer to which the output is appended.
|
Constructor and Description |
---|
FMUBuilder()
Create a FMUBuilder.
|
FMUBuilder(boolean appendToStderrAndStdout)
Create a FMUBuilder and optionally append to stderr
and stdout as the commands are executed.
|
Modifier and Type | Method and Description |
---|---|
private void |
_appendToBuffer(java.lang.String text)
Append to the internal StringBuffer.
|
boolean |
build(java.io.File sharedLibraryFile)
Build the specified shared library inside the FMU.
|
void |
stderr(java.lang.String text)
Append the text message to the StringBuffer.
|
void |
stdout(java.lang.String text)
Append the text message to the StringBuffer.
|
public java.lang.StringBuffer buffer
private boolean _appendToStderrAndStdout
private static java.lang.String _eol
public FMUBuilder()
public FMUBuilder(boolean appendToStderrAndStdout)
appendToStderrAndStdout
- If true, then as the commands
are executed, the output is append to stderr and stdout.public boolean build(java.io.File sharedLibraryFile) throws java.io.IOException
A typicaly value is
/tmp/FMUFile12345/binaries/linux64/stepCounter.dylib
.
Typically the sharedLibrary is inside a temporary directory
that was created when the fmu file was unzipped. The
directory names the platform for which the binary is to be
built. This directory resides inside a directory named
binaries/
. Adjacent to the binaries/
directory is the sources/
directory.
sharedLibraryFile
- The shared library that should be built.java.io.IOException
- If the FMU contains a makefile but
there was a problem building the shared library.public void stderr(java.lang.String text)
text
- The text to append.public void stdout(java.lang.String text)
text
- The text to append.private void _appendToBuffer(java.lang.String text)
text
- The text to append. If the text does not
end with an end of line character(s), then _eol is appended.