forked from rhcad/x3c
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test std::vector<std::string> in python.
- Loading branch information
Showing
4 changed files
with
12 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import x3core as C | ||
|
||
assert(C.LoadPluginFiles("ChangeManager")) | ||
files = C.GetPluginFiles() | ||
print(files) | ||
for f in C.GetPluginFiles(): print(f) | ||
|
||
C.UnloadPlugins() |
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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
%module x3core | ||
|
||
%{ | ||
#include <UtilFunc/vecfunc.h> | ||
using namespace std; | ||
typedef vector<wstring> WStrVector; | ||
#include <vector> | ||
#include <string> | ||
|
||
bool LoadCorePlugins(); | ||
bool LoadAllPlugins(); | ||
bool LoadPluginFiles(const char* files); | ||
void UnloadPlugins(); | ||
std::vector<std::wstring> GetPluginFiles(); | ||
std::vector<std::string> GetPluginFiles(); | ||
%} | ||
|
||
%include stl.i | ||
using namespace std; | ||
%include std_vector.i | ||
%include std_string.i | ||
|
||
%template(WStrVector) vector<wstring>; | ||
%template(StrVector) std::vector<std::string>; | ||
|
||
bool LoadCorePlugins(); | ||
bool LoadAllPlugins(); | ||
bool LoadPluginFiles(const char* files); | ||
void UnloadPlugins(); | ||
WStrVector GetPluginFiles(); | ||
std::vector<std::string> GetPluginFiles(); |
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