m_Service(service), m_ObjectLoader(&object_loader), m_Options(options)
73 ITERATE(vector<IProjectItemExtension*>, it, clients) {
74 stringextName =
"Unknown extension";
78(*it)->ProjectItemCreated(item, srvLocator);
79}
NCBI_CATCH(
"Project item created \""+ extName +
"\" error.");
94 if(!execute_unit || !execute_unit->PreExecute())
99 if(!execute_unit || !execute_unit->PostExecute())
120vector<IProjectItemExtension*> clients;
141 if(sub && sub->IsSetData() && sub->IsEntrys()) {
150item->
SetLabel(it->GetDescription());
152list<string> comment;
154 ITERATE(list<string>, iter, comment) {
155 if(!iter->empty()) {
158item->
SetDescr().push_back(annot);
162 for(
auto t: projectItemExtra)
165 stringfilePath = it->GetFileName();
166 if(!filePath.empty()) {
170wxFileName fileName(wxString::FromUTF8(filePath.c_str()));
171 stringfname(fileName.GetFullName().ToUTF8());
177items.push_back(item);
User-defined methods of the data storage class.
CAppJobTask CAppJobTask is an adapter that allows for running IAppJobs as Tasks in App Task Service.
static bool m_SaveFilePath
CObjectLoadingTask.
static bool AddObjects(IServiceLocator *serviceLocator, IObjectLoader::TObjects &objects, objects::CLoaderDescriptor *loader, CSelectProjectOptions &options, const map< string, string > &projectItemExtra=map< string, string >())
void AddProjectItemExtra(const string &tag, const string &value)
map< string, string > m_ProjectItemExtra
CIRef< IObjectLoader > m_ObjectLoader
CIRef< CProjectService > m_Service
CSelectProjectOptions m_Options
CObjectLoadingTask(CProjectService *service, IObjectLoader &object_loader, CSelectProjectOptions &options)
virtual ETaskState Run()
execute the task, this function is called on the main UI thread if a task needs to execute in backgro...
static void PrefetchSeqDescr(IServiceLocator *serviceLocator, const vector< CRef< objects::CProjectItem > > &items)
void SetObject(CSerialObject &object)
wrapper for setting the object pointed to by this item
CProjectService - a service providing API for operations with Workspaces and Projects.
CProjectSelectOptions - describes how new Project Items shall be added to a workspace.
bool AddItemsToWorkspace(CProjectService *service, const TData &data)
vector< TItemRef > TItems
Base class for all serializable objects.
IExtension IExtension interface represents an abstract pluggable component.
vector< SObject > TObjects
virtual string GetDescription() const =0
IServiceLocator - an abstract mechanism for locating services.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define NCBI_CATCH(message)
Catch CExceptions as well This macro is deprecated - use *_X or *_XX variant instead of it.
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
ETaskState
List of task states defining the task management FSM.
virtual ETaskState Run()
execute the task, this function is called on the main UI thread if a task needs to execute in backgro...
@ eCanceled
canceled by Task Manager
@ eCompleted
successfully finished
@ eInitial
has not been executed yet
void GetExtensionAsInterface(const string &ext_point_id, vector< CIRef< I > > &interfaces)
GetExtensionAsInterface() is a helper function that extracts all extensions implementing the specifie...
virtual string GetExtensionIdentifier() const =0
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
TDescr & SetDescr(void)
Assign a value to Descr data member.
void SetLabel(const TLabel &value)
Assign a value to Label data member.
TSet & SetSet(void)
Select the variant.
TSeq & SetSeq(void)
Select the variant.
TComment & SetComment(void)
Select the variant.
list< CRef< CSeq_entry > > TEntrys
const GenericPointer< typename T::ValueType > T2 value
static void s_CallExtensionProjectItemCreated(vector< IProjectItemExtension * > &clients, CProjectItem &item, IServiceLocator *srvLocator)
#define EXT_POINT__PROJECT_ITEM_EXTENSION
void HandleCollidingIds(CSeq_entry &entry)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4