Mass++ mzML IO Plugin v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations
Macros | Functions
MzmlIOPluginFunctions.cpp File Reference

implements of MzmlIO plug-in function More...

#include "stdafx.h"
#include "MzmlIOPluginFunctions.h"
#include "MzmlSample.h"
#include "MzmlManager.h"
#include "MzmlSampleSet.h"
#include <crtdbg.h>
Include dependency graph for MzmlIOPluginFunctions.cpp:

Go to the source code of this file.

Macros

#define DATA_STATUS   "data_status"
 

Functions

kome::objects::Variant openMzml (kome::objects::Parameters *params)
 open mzml file More...
 
kome::objects::Variant saveMzml (kome::objects::Parameters *params)
 save mzml file More...
 

Detailed Description

implements of MzmlIO plug-in function

Author
S.Tanaka
Date
2009.03.09

Copyright(C) 2006-2014 Eisai Co., Ltd. All rights reserved.

Definition in file MzmlIOPluginFunctions.cpp.

Function Documentation

kome::objects::Variant openMzml ( kome::objects::Parameters *  params)

open mzml file

Parameters
paramsparameters object. (This object has path information.)
Returns
return value. (Sample Object)

Definition at line 33 of file MzmlIOPluginFunctions.cpp.

33  {
34  // return value
35  kome::objects::Variant ret;
36  ret.type = kome::objects::Variant::SAMPLE_SET;
37  ret.prim.pt = NULL;
38 
39  // get path
40  const char* path = kome::plugin::PluginCallTool::getPath( params );
41  if( path == NULL ) {
42  return ret;
43  }
44 
45  // open
46  MzmlSampleSet* sampleSet = new MzmlSampleSet();
47 
48  // set file
49  ret.prim.pt = sampleSet;
50 
51  return ret;
52 }
mzML sample set class
Definition: MzmlSampleSet.h:24
kome::objects::Variant saveMzml ( kome::objects::Parameters *  params)

save mzml file

Parameters
paramsparameters object. (This object has spectrum group and path information.)
Returns
return value. (If it succeeded to save the file, this function returns ture. [bool])

Definition at line 55 of file MzmlIOPluginFunctions.cpp.

55  {
56  // return value
57  kome::objects::Variant ret;
58  ret.type = kome::objects::Variant::BOOL;
59  ret.prim.boolVal = false;
60 
61  // gets parameters
62  kome::objects::DataSet* dataSet = kome::plugin::PluginCallTool::getDataSet( params );
63  if( dataSet == NULL ) {
64  return ret;
65  }
66 
67  char* path = kome::plugin::PluginCallTool::getPath( params );
68  if( path == NULL ) {
69  return ret;
70  }
71 
72  kome::core::Progress* progress = kome::plugin::PluginCallTool::getProgress( params );
73  if( progress == NULL ) {
74  progress = &kome::core::Progress::getIgnoringProgress();
75  }
76 
77  kome::objects::SettingParameterValues* saveSettings = kome::plugin::PluginCallTool::getSettingValues( params ); // @date 2012/08/21 <Add> FUJITA
78 
79  // write
80  MzmlManager& mgr = MzmlManager::getInstance();
81  ret.prim.boolVal = mgr.exportDataSet( path, *dataSet, *progress, saveSettings );
82  return ret;
83 }
mzML IO management class
Definition: MzmlManager.h:26

Here is the call graph for this function: