_cbName = "ComplexBoxName";
_cbPackageName = "PackageName";
_Author = "Author ??";
+ _ExportFormat = 0;
_Category = "<VOID>";
_Description = "Description ??";
_MessageKind = "-";
content += GetAuthor();
content += "\n";
+ content += "EXPORTFORMAT:";
+ sprintf(buffer, "%d", GetExportFormat()) ;
+ content += buffer;
+ content += "\n";
+
//Print info IF COMPLEX BOX
content += "COMPLEXBOX:";
if (_isComplexBox) {
}
if (line == "# - BBTKGEditor v 1.5 BBG BlackBox Diagram file") {
version = line.substr(18, 3);
+ }
+ if (line == "# - BBTKGEditor v 1.6 BBG BlackBox Diagram file") {
+ version = line.substr(18, 3);
}
} else if (line == "APP_START") {
start = true;
result = strtok(authorTmp, delims);
result = strtok(NULL, delims);
SetAuthor(result);
+
+ if(version >= "1.6")
+ {
+ getCleanLine(inputStream, line);//EXPORTFORMAT:<0:bbs 1:ALL 2:bbs,Python 3:bbs,JavaScript>
+ char authorTmp[255];
+ strcpy(authorTmp, line.c_str());
+ result = strtok(authorTmp, delims);
+ result = strtok(NULL, delims);
+ int exportformatTMP;
+ std::istringstream inps(result);
+ inps >> exportformatTMP;
+ SetExportFormat( exportformatTMP );
+ }
+
}
//----------
}
//=========================================================================
-std::string wxVtkSceneManager::GetCbPackageName() {
+std::string wxVtkSceneManager::GetCbPackageName()
+{
return _cbPackageName;
}
//=========================================================================
-void wxVtkSceneManager::SetAuthor(std::string author) {
- _Author = author;
- if (_Author == "") {
- _Author = "<author of the box>";
- }
+void wxVtkSceneManager::SetAuthor(std::string author)
+{
+ _Author = author;
+ if (_Author == "")
+ {
+ _Author = "<author of the box>";
+ }
}
//=========================================================================
-std::string wxVtkSceneManager::GetAuthor() {
- return _Author;
+std::string wxVtkSceneManager::GetAuthor()
+{
+ return _Author;
+}
+
+//=========================================================================
+void wxVtkSceneManager::SetExportFormat(int exportformat)
+{
+ _ExportFormat = exportformat;
+}
+
+//=========================================================================
+int wxVtkSceneManager::GetExportFormat()
+{
+ return _ExportFormat;
}
//=========================================================================
-void wxVtkSceneManager::SetCategory(std::string category) {
+void wxVtkSceneManager::SetCategory(std::string category)
+{
_Category = category;
- if (_Category == "") {
+ if (_Category == "")
+ {
_Category = "<category of the box>";
}
}
//=========================================================================
-std::string wxVtkSceneManager::GetCategory() {
+std::string wxVtkSceneManager::GetCategory()
+{
return _Category;
}