Skip to content

Commit

Permalink
改回来。。。
Browse files Browse the repository at this point in the history
  • Loading branch information
yinyue200 committed Sep 17, 2016
1 parent 23964b7 commit a946ddd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions OpenCCxRuntineComponent/OpenCCx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ OpenCCx::OpenCCx()
, opencc_open_fun_(NULL)
, opencc_close_fun_(NULL)
, opencc_convert_utf8_to_buffer_fun_(NULL)
, opencc_error_fun_ (NULL)
, opencc_error_fun_(NULL)
, currConverter_(NULL)
{
}

bool OpenCCxRuntineComponent::OpenCCx::Load(ConverterType type)
{
if (dllHandle_ == NULL) {
Expand Down Expand Up @@ -80,7 +81,7 @@ bool OpenCCxRuntineComponent::OpenCCx::Load(ConverterType type)
return true;
}

void OpenCCxRuntineComponent::OpenCCx::Dispose()
void OpenCCxRuntineComponent::OpenCCx::Close()
{
if (opencc_close_fun_) {
for (auto it = loadedTypes_.begin(); it != loadedTypes_.end(); ++it) {
Expand Down
10 changes: 6 additions & 4 deletions OpenCCxRuntineComponent/OpenCCx.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,17 @@ namespace OpenCCxRuntineComponent



public ref class OpenCCx sealed:IDisposable
{
public:
public ref class OpenCCx sealed
{
public:
OpenCCx();

public:
bool Load(ConverterType type);
void Close();
String^ Convert(String^ toConvert);
String^ Error();

private:
private:
bool LoadDll();
Expand All @@ -67,6 +69,6 @@ namespace OpenCCxRuntineComponent
HMODULE dllHandle_;
std::map<ConverterType, opencc_t> loadedTypes_;
opencc_t currConverter_;
};
};

}

0 comments on commit a946ddd

Please sign in to comment.