Browse Source

ExportIterations: add getFileName()

master
Joachim Klein 8 years ago
parent
commit
079cb9f796
  1. 9
      prism/include/ExportIterations.h
  2. 12
      prism/src/explicit/ExportIterations.java

9
prism/include/ExportIterations.h

@ -41,6 +41,7 @@
class ExportIterations {
private:
FILE *fp;
std::string filename;
public:
/**
@ -48,6 +49,7 @@ public:
*/
ExportIterations(const char* title = "", const char* filename = get_export_iterations_filename()) {
fp = fopen(filename, "w");
this->filename = filename;
fprintf(fp, "<!DOCTYPE html>\n");
fprintf(fp, "<html><head>\n");
@ -64,6 +66,13 @@ public:
fprintf(fp, "<script src=\"http://www.prismmodelchecker.org/js/res/iteration-vis-v1.js\"></script>\n");
}
/**
* Get the filename used for exporting.
*/
const std::string& getFileName() {
return filename;
}
/**
* Export the given vector, with size n and given type (0 = normal, VI from below, 1 = VI from above)
*/

12
prism/src/explicit/ExportIterations.java

@ -70,6 +70,18 @@ public class ExportIterations {
log.flush();
}
/**
* Returns the name of the file used for exporting,
* or {@code null} if it can not be determined.
*/
public String getFileName()
{
if (log instanceof PrismFileLog) {
return ((PrismFileLog)log).getFileName();
}
return null;
}
/**
* Export the given vector.
* @param soln the value vector

Loading…
Cancel
Save