-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Splitted up Converter into Legacy and V2 2. Splitted up Extractor into Interface and Implementation 3. JavaContainerBuilder now instantiates Extractor instead of parser.
- Loading branch information
Showing
25 changed files
with
307 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
exaudfclient/base/javacontainer/script_options/converter_legacy.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "base/javacontainer/script_options/converter_legacy.h" | ||
#include "base/javacontainer/script_options/string_ops.h" | ||
#include <iostream> | ||
|
||
namespace SWIGVMContainers { | ||
|
||
namespace JavaScriptOptions { | ||
|
||
ConverterLegacy::ConverterLegacy() | ||
: Converter() | ||
, m_jarPaths() {} | ||
|
||
void ConverterLegacy::convertExternalJar(const std::string & value) { | ||
for (size_t start = 0, delim = 0; ; start = delim + 1) { | ||
delim = value.find(":", start); | ||
if (delim != std::string::npos) { | ||
std::string jar = value.substr(start, delim - start); | ||
if (m_jarPaths.find(jar) == m_jarPaths.end()) | ||
m_jarPaths.insert(jar); | ||
} | ||
else { | ||
std::string jar = value.substr(start); | ||
if (m_jarPaths.find(jar) == m_jarPaths.end()) | ||
m_jarPaths.insert(jar); | ||
break; | ||
} | ||
} | ||
} | ||
|
||
|
||
} //namespace JavaScriptOptions | ||
|
||
} //namespace SWIGVMContainers |
41 changes: 41 additions & 0 deletions
41
exaudfclient/base/javacontainer/script_options/converter_legacy.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#ifndef SCRIPTOPTIONLINEPARSERCONVERTERLEGACY_H | ||
#define SCRIPTOPTIONLINEPARSERCONVERTERLEGACY_H 1 | ||
|
||
#include <string> | ||
#include <vector> | ||
#include <set> | ||
#include <memory> | ||
|
||
#include "base/javacontainer/script_options/converter.h" | ||
|
||
|
||
|
||
namespace SWIGVMContainers { | ||
|
||
namespace JavaScriptOptions { | ||
|
||
class ConverterLegacy : public Converter { | ||
|
||
public: | ||
ConverterLegacy(); | ||
|
||
void convertExternalJar(const std::string & value); | ||
|
||
const std::set<std::string> & getJarPaths() const { | ||
return m_jarPaths; | ||
} | ||
|
||
private: | ||
|
||
std::set<std::string> m_jarPaths; | ||
|
||
}; | ||
|
||
|
||
|
||
|
||
} //namespace JavaScriptOptions | ||
|
||
} //namespace SWIGVMContainers | ||
|
||
#endif //SCRIPTOPTIONLINEPARSERCONVERTER_H |
34 changes: 34 additions & 0 deletions
34
exaudfclient/base/javacontainer/script_options/converter_v2.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include "base/javacontainer/script_options/converter_v2.h" | ||
#include "base/javacontainer/script_options/string_ops.h" | ||
#include <iostream> | ||
|
||
namespace SWIGVMContainers { | ||
|
||
namespace JavaScriptOptions { | ||
|
||
ConverterV2::ConverterV2() | ||
: Converter() | ||
, m_jarPaths() {} | ||
|
||
void ConverterV2::convertExternalJar(const std::string & value) { | ||
|
||
for (size_t start = 0, delim = 0; ; start = delim + 1) { | ||
delim = value.find(":", start); | ||
if (delim != std::string::npos) { | ||
std::string jar = value.substr(start, delim - start); | ||
if (m_jarPaths.find(jar) == m_jarPaths.end()) | ||
m_jarPaths.insert(jar); | ||
} | ||
else { | ||
std::string jar = value.substr(start); | ||
if (m_jarPaths.find(jar) == m_jarPaths.end()) | ||
m_jarPaths.insert(jar); | ||
break; | ||
} | ||
} | ||
} | ||
|
||
|
||
} //namespace JavaScriptOptions | ||
|
||
} //namespace SWIGVMContainers |
Oops, something went wrong.