FindClass
Find an object of a registered type class [in the specified file and compile and link it as needed] [and can optionally compile and link dependent file] Consecutive calls made to FindClass returns a reference to the same object
ClassObject FindClass( LPCSTR lpcszName, LPCSTR lpcszPath = NULL, BOOL bCompileDependents = TRUE )
Returns a ClassObject if successfull (can use NULL comparison) can be casted to a refrence to the desired type.
EX1
void Project_FindClass_Ex1() { string strFilename = GetAppPath(true) + "OriginC\\Originlab\\FitNL.cpp"; OperationBase& op = (OperationBase&) Project.CreateClass("FitNL", strFilename); if(op == NULL) { printf("Create class failed"); return; } OperationBase& op2 = (OperationBase&) Project.FindClass("FitNL",strFilename); if( NULL == op) printf("Fail to find class object of FitNL"); else printf("find class object of FitNL successfully"); }
Project::CreateClass, Project::FindFunction
origin.h