SAGA API
v9.6
|
#include <tool_library.h>
Public Member Functions | |
CSG_Tool_Library_Manager (void) | |
virtual | ~CSG_Tool_Library_Manager (void) |
bool | Destroy (void) |
int | Get_Count (void) const |
int | Get_Tool_Count (void) const |
bool | Add_Default_Libraries (bool bVerbose=false) |
CSG_Tool_Library * | Add_Library (const CSG_String &File) |
CSG_Tool_Library * | Add_Library (const char *File) |
CSG_Tool_Library * | Add_Library (const wchar_t *File) |
int | Add_Directory (const CSG_String &Directory, bool bOnlySubDirectories=false) |
int | Add_Directory (const char *Directory, bool bOnlySubDirectories=false) |
int | Add_Directory (const wchar_t *Directory, bool bOnlySubDirectories=false) |
bool | Del_Library (int i) |
bool | Del_Library (CSG_Tool_Library *pLibrary) |
CSG_Tool_Library * | Get_Library (int i) const |
CSG_Tool_Library * | Get_Library (const CSG_String &Name, bool bLibrary, ESG_Library_Type Type=ESG_Library_Type::Undefined) const |
CSG_Tool_Library * | Get_Library (const char *Name, bool bLibrary, ESG_Library_Type Type=ESG_Library_Type::Undefined) const |
CSG_Tool_Library * | Get_Library (const wchar_t *Name, bool bLibrary, ESG_Library_Type Type=ESG_Library_Type::Undefined) const |
bool | is_Loaded (CSG_Tool_Library *pLibrary) const |
CSG_Tool * | Get_Tool (const CSG_String &Library, int Index) const |
CSG_Tool * | Get_Tool (const char *Library, int Index) const |
CSG_Tool * | Get_Tool (const wchar_t *Library, int Index) const |
CSG_Tool * | Get_Tool (const CSG_String &Library, const CSG_String &Name) const |
CSG_Tool * | Get_Tool (const char *Library, const char *Name) const |
CSG_Tool * | Get_Tool (const wchar_t *Library, const wchar_t *Name) const |
CSG_Tool * | Create_Tool (const CSG_String &Library, int Index, bool bWithGUI=false, bool bWithCMD=true) const |
CSG_Tool * | Create_Tool (const char *Library, int Index, bool bWithGUI=false, bool bWithCMD=true) const |
CSG_Tool * | Create_Tool (const wchar_t *Library, int Index, bool bWithGUI=false, bool bWithCMD=true) const |
CSG_Tool * | Create_Tool (const CSG_String &Library, const CSG_String &Name, bool bWithGUI=false, bool bWithCMD=true) const |
CSG_Tool * | Create_Tool (const char *Library, const char *Name, bool bWithGUI=false, bool bWithCMD=true) const |
CSG_Tool * | Create_Tool (const wchar_t *Library, const wchar_t *Name, bool bWithGUI=false, bool bWithCMD=true) const |
bool | Delete_Tool (CSG_Tool *pTool) const |
CSG_String | Get_Summary (int Format=SG_SUMMARY_FMT_HTML) const |
bool | Get_Summary (const CSG_String &Path) const |
bool | Create_Python_ToolBox (const CSG_String &Destination, bool bClean=true, bool bName=true, bool bSingleFile=false) const |
Definition at line 183 of file tool_library.h.
CSG_Tool_Library_Manager::CSG_Tool_Library_Manager | ( | void | ) |
Definition at line 297 of file tool_library.cpp.
References g_Tool_Library_Manager, and CSG_Random::Initialize().
|
virtual |
Definition at line 309 of file tool_library.cpp.
References Destroy().
bool CSG_Tool_Library_Manager::Add_Default_Libraries | ( | bool | bVerbose = false | ) |
Definition at line 338 of file tool_library.cpp.
References Add_Directory(), CSG_Strings::Get_Count(), Get_Count(), SG_File_Make_Path(), SG_Get_Environment(), SG_Get_Tool_Library_Manager(), SG_String_Tokenize(), SG_UI_Get_API_Path(), SG_UI_Get_Application_Path(), and SG_UI_Msg_Lock().
Referenced by SG_Initialize_Environment().
int CSG_Tool_Library_Manager::Add_Directory | ( | const char * | Directory, |
bool | bOnlySubDirectories = false |
||
) |
Definition at line 464 of file tool_library.cpp.
References Add_Directory().
int CSG_Tool_Library_Manager::Add_Directory | ( | const CSG_String & | Directory, |
bool | bOnlySubDirectories = false |
||
) |
Definition at line 466 of file tool_library.cpp.
References Add_Library(), CSG_String::c_str(), and SG_File_Make_Path().
Referenced by Add_Default_Libraries(), and Add_Directory().
int CSG_Tool_Library_Manager::Add_Directory | ( | const wchar_t * | Directory, |
bool | bOnlySubDirectories = false |
||
) |
Definition at line 465 of file tool_library.cpp.
References Add_Directory().
CSG_Tool_Library * CSG_Tool_Library_Manager::Add_Library | ( | const char * | File | ) |
Definition at line 407 of file tool_library.cpp.
References Add_Library().
CSG_Tool_Library * CSG_Tool_Library_Manager::Add_Library | ( | const CSG_String & | File | ) |
Definition at line 409 of file tool_library.cpp.
References _TL, CSG_String::c_str(), CSG_String::Format(), Get_Count(), CSG_Tool_Library::Get_File_Name(), Get_Library(), CSG_Tool_Library::is_Valid(), SG_File_Cmp_Extension(), SG_File_Exists(), SG_Realloc(), SG_UI_Msg_Add(), SG_UI_MSG_STYLE_FAILURE, and SG_UI_MSG_STYLE_SUCCESS.
Referenced by Add_Directory(), and Add_Library().
CSG_Tool_Library * CSG_Tool_Library_Manager::Add_Library | ( | const wchar_t * | File | ) |
Definition at line 408 of file tool_library.cpp.
References Add_Library().
bool CSG_Tool_Library_Manager::Create_Python_ToolBox | ( | const CSG_String & | Destination, |
bool | bClean = true , |
||
bool | bName = true , |
||
bool | bSingleFile = false |
||
) | const |
Definition at line 884 of file tool_library.cpp.
References _TL, CSG_String::c_str(), CSG_String::Cmp(), CSG_Tool_Library::Create_Tool(), CSG_Tool_Library::Delete_Tool(), CSG_String::Format(), CSG_Tool_Library::Get_Category(), CSG_Strings::Get_Count(), CSG_Tool_Library::Get_Count(), Get_Count(), CSG_Tool_Library::Get_Description(), CSG_Tool::Get_ID(), Get_Library(), CSG_Tool_Library::Get_Library_Name(), CSG_Tool_Library::Get_Name(), CSG_Tool::Get_Parameters_Count(), CSG_Tool::Get_Script(), CSG_Tool_Library::Get_Tool(), CSG_Tool_Library::Get_Type(), CSG_Tool::is_Interactive(), CSG_Tool::needs_GUI(), CSG_File::Open(), CSG_File::Printf(), CSG_File::Seek_End(), SG_Dir_Create(), SG_Dir_Exists(), SG_Dir_List_Files(), SG_File_Delete(), SG_FILE_ENCODING_UTF8, SG_File_Exists(), SG_File_Make_Path(), SG_FILE_RW, SG_FILE_W, SG_HTML_Tag_Replacer(), SG_T, SG_UI_Msg_Add_Error(), SG_UI_Process_Set_Progress(), SG_UI_Process_Set_Text(), SG_UI_Set_Application_Name(), TOOL_SCRIPT_PYTHON_WRAP_ID, TOOL_SCRIPT_PYTHON_WRAP_NAME, and CSG_File::Write().
CSG_Tool * CSG_Tool_Library_Manager::Create_Tool | ( | const char * | Library, |
const char * | Name, | ||
bool | bWithGUI = false , |
||
bool | bWithCMD = true |
||
) | const |
Definition at line 842 of file tool_library.cpp.
References Create_Tool().
CSG_Tool * CSG_Tool_Library_Manager::Create_Tool | ( | const char * | Library, |
int | Index, | ||
bool | bWithGUI = false , |
||
bool | bWithCMD = true |
||
) | const |
Definition at line 834 of file tool_library.cpp.
References Create_Tool().
CSG_Tool * CSG_Tool_Library_Manager::Create_Tool | ( | const CSG_String & | Library, |
const CSG_String & | Name, | ||
bool | bWithGUI = false , |
||
bool | bWithCMD = true |
||
) | const |
Definition at line 844 of file tool_library.cpp.
References CSG_String::Cmp(), CSG_Tool_Library::Create_Tool(), Get_Count(), Get_Library(), CSG_Tool_Library::Get_Library_Name(), and SG_Get_Tool_Library_Manager().
CSG_Tool * CSG_Tool_Library_Manager::Create_Tool | ( | const CSG_String & | Library, |
int | Index, | ||
bool | bWithGUI = false , |
||
bool | bWithCMD = true |
||
) | const |
Definition at line 836 of file tool_library.cpp.
References CSG_String::Format().
Referenced by CSG_Parameters_CRSPicker::Activate_GUI(), CSG_Shapes::Create(), CSG_Table::Create(), Create_Tool(), CSG_Projections::Parse(), and SG_Get_Projected().
CSG_Tool * CSG_Tool_Library_Manager::Create_Tool | ( | const wchar_t * | Library, |
const wchar_t * | Name, | ||
bool | bWithGUI = false , |
||
bool | bWithCMD = true |
||
) | const |
Definition at line 843 of file tool_library.cpp.
References Create_Tool().
CSG_Tool * CSG_Tool_Library_Manager::Create_Tool | ( | const wchar_t * | Library, |
int | Index, | ||
bool | bWithGUI = false , |
||
bool | bWithCMD = true |
||
) | const |
Definition at line 835 of file tool_library.cpp.
References Create_Tool().
bool CSG_Tool_Library_Manager::Del_Library | ( | CSG_Tool_Library * | pLibrary | ) |
Definition at line 637 of file tool_library.cpp.
References Del_Library(), Get_Count(), and Get_Library().
bool CSG_Tool_Library_Manager::Del_Library | ( | int | i | ) |
Definition at line 651 of file tool_library.cpp.
References Get_Count(), and SG_Realloc().
Referenced by Del_Library().
bool CSG_Tool_Library_Manager::Delete_Tool | ( | CSG_Tool * | pTool | ) | const |
Definition at line 865 of file tool_library.cpp.
References CSG_Tool_Library::Delete_Tool(), Get_Count(), and Get_Library().
Referenced by CSG_Shapes::Create(), CSG_Table::Create(), CSG_Parameters_CRSPicker::Deactivate_GUI(), CSG_Projections::Parse(), and SG_Get_Projected().
bool CSG_Tool_Library_Manager::Destroy | ( | void | ) |
Definition at line 606 of file tool_library.cpp.
References Get_Count(), SG_Free(), and SG_UI_Get_Window_Main().
Referenced by ~CSG_Tool_Library_Manager().
|
inline |
Definition at line 191 of file tool_library.h.
Referenced by Add_Default_Libraries(), Add_Library(), Create_Python_ToolBox(), Create_Tool(), Del_Library(), Delete_Tool(), Destroy(), Get_Library(), Get_Summary(), Get_Tool(), is_Loaded(), and CSG_Tool_Library::is_Valid().
CSG_Tool_Library * CSG_Tool_Library_Manager::Get_Library | ( | const char * | Name, |
bool | bLibrary, | ||
ESG_Library_Type | Type = ESG_Library_Type::Undefined |
||
) | const |
Definition at line 690 of file tool_library.cpp.
References Get_Library().
CSG_Tool_Library * CSG_Tool_Library_Manager::Get_Library | ( | const CSG_String & | Name, |
bool | bLibrary, | ||
ESG_Library_Type | Type = ESG_Library_Type::Undefined |
||
) | const |
Definition at line 692 of file tool_library.cpp.
References CSG_String::Cmp(), Get_Count(), Get_Library(), CSG_Tool_Library::Get_Library_Name(), CSG_Tool_Library::Get_Name(), CSG_Tool_Library::Get_Type(), Library, and SG_Get_Tool_Library_Manager().
CSG_Tool_Library * CSG_Tool_Library_Manager::Get_Library | ( | const wchar_t * | Name, |
bool | bLibrary, | ||
ESG_Library_Type | Type = ESG_Library_Type::Undefined |
||
) | const |
Definition at line 691 of file tool_library.cpp.
References Get_Library().
|
inline |
Definition at line 207 of file tool_library.h.
Referenced by Add_Library(), Create_Python_ToolBox(), Create_Tool(), Del_Library(), Delete_Tool(), Get_Library(), Get_Summary(), Get_Tool(), and is_Loaded().
bool CSG_Tool_Library_Manager::Get_Summary | ( | const CSG_String & | Path | ) | const |
Definition at line 909 of file tool_summary.cpp.
References Get_Count(), Get_Library(), CSG_Tool_Library::Get_Library_Name(), CSG_Tool_Library::Get_Summary(), SG_Dir_Create(), and SG_File_Make_Path().
CSG_String CSG_Tool_Library_Manager::Get_Summary | ( | int | Format = SG_SUMMARY_FMT_HTML | ) | const |
Definition at line 791 of file tool_summary.cpp.
References _TL, CSG_Table::Add_Field(), CSG_Table::Add_Record(), CSG_String::Format(), CSG_Table::Get_Count(), CSG_Tool_Library::Get_Count(), Get_Count(), Get_Library(), SAGA_VERSION, CSG_Table::Set_Index(), CSG_Table::Set_Value(), SG_DATATYPE_Int, SG_DATATYPE_String, SG_File_Get_Path(), SG_SUMMARY_FMT_FLAT, SG_SUMMARY_FMT_HTML, SG_SUMMARY_FMT_XML, SG_XML_LIBRARY, SG_XML_LIBRARY_NAME, SG_XML_SYSTEM, SG_XML_SYSTEM_VER, SUMMARY_ADD_INT, and TABLE_INDEX_Ascending.
CSG_Tool * CSG_Tool_Library_Manager::Get_Tool | ( | const char * | Library, |
const char * | Name | ||
) | const |
Definition at line 806 of file tool_library.cpp.
References Get_Tool().
CSG_Tool * CSG_Tool_Library_Manager::Get_Tool | ( | const char * | Library, |
int | Index | ||
) | const |
Definition at line 798 of file tool_library.cpp.
References Get_Tool().
CSG_Tool * CSG_Tool_Library_Manager::Get_Tool | ( | const CSG_String & | Library, |
const CSG_String & | Name | ||
) | const |
Definition at line 808 of file tool_library.cpp.
References CSG_String::Cmp(), Get_Count(), Get_Library(), CSG_Tool_Library::Get_Library_Name(), CSG_Tool_Library::Get_Tool(), and SG_Get_Tool_Library_Manager().
CSG_Tool * CSG_Tool_Library_Manager::Get_Tool | ( | const CSG_String & | Library, |
int | Index | ||
) | const |
Definition at line 800 of file tool_library.cpp.
References CSG_String::Format().
Referenced by Get_Tool().
CSG_Tool * CSG_Tool_Library_Manager::Get_Tool | ( | const wchar_t * | Library, |
const wchar_t * | Name | ||
) | const |
Definition at line 807 of file tool_library.cpp.
References Get_Tool().
CSG_Tool * CSG_Tool_Library_Manager::Get_Tool | ( | const wchar_t * | Library, |
int | Index | ||
) | const |
Definition at line 799 of file tool_library.cpp.
References Get_Tool().
int CSG_Tool_Library_Manager::Get_Tool_Count | ( | void | ) | const |
Definition at line 320 of file tool_library.cpp.
References CSG_Tool_Library::Get_Count().
bool CSG_Tool_Library_Manager::is_Loaded | ( | CSG_Tool_Library * | pLibrary | ) | const |
Definition at line 671 of file tool_library.cpp.
References Get_Count(), and Get_Library().