ProteoWizard
Public Member Functions | Private Member Functions | Private Attributes | List of all members
pwiz::identdata::TextWriter Class Reference

#include <TextWriter.hpp>

Public Member Functions

 TextWriter (std::ostream &os, int depth=0)
 
TextWriter child ()
 
TextWriteroperator() (const std::string &text)
 
TextWriteroperator() (const float value)
 
TextWriteroperator() (const CVParam &cvParam)
 
TextWriteroperator() (const std::string &label, const float &v)
 
TextWriteroperator() (const std::string &label, const double &v)
 
TextWriteroperator() (const std::string &label, const bool &v)
 
TextWriteroperator() (const UserParam &userParam)
 
template<typename object_type >
TextWriteroperator() (const std::string &label, const std::vector< object_type > &v)
 
template<typename object_type >
TextWriteroperator() (const std::vector< object_type > &v)
 
template<typename object_type >
TextWriteroperator() (const std::string &label, const object_type &v)
 
TextWriteroperator() (const std::string &label, const ParamContainer &paramContainer)
 
TextWriteroperator() (const ParamContainer &paramContainer)
 
TextWriteroperator() (const BibliographicReference &br)
 
TextWriteroperator() (const TranslationTable &tt)
 
TextWriteroperator() (const DatabaseTranslation &dt)
 
TextWriteroperator() (const SpectrumIdentificationProtocol &si)
 
TextWriteroperator() (const DBSequence &ds)
 
TextWriteroperator() (const SubstitutionModification &ds)
 
TextWriteroperator() (const IonType &it)
 
TextWriteroperator() (const Measure &m)
 
TextWriteroperator() (const SearchDatabase &sd)
 
TextWriteroperator() (const SpectraData &sd)
 
TextWriteroperator() (const SpectrumIdentificationItem &sii)
 
TextWriteroperator() (const SpectrumIdentificationResult &sir)
 
TextWriteroperator() (const SpectrumIdentificationList &sil)
 
TextWriteroperator() (const ProteinDetectionList &pdl)
 
TextWriteroperator() (const AnalysisData &ad)
 
TextWriteroperator() (const FragmentArray &fa)
 
TextWriteroperator() (const SourceFile &sf)
 
TextWriteroperator() (const Inputs &inputs)
 
TextWriteroperator() (const DataCollection &dc)
 
TextWriteroperator() (const Filter &f)
 
TextWriteroperator() (const SearchModification &sm)
 
TextWriteroperator() (const Enzymes &ezs)
 
TextWriteroperator() (const MassTable &mt)
 
TextWriteroperator() (const AnalysisProtocolCollection &apc)
 
TextWriteroperator() (const PeptideHypothesis &ph)
 
TextWriteroperator() (const ProteinDetectionHypothesis &pdh)
 
TextWriteroperator() (const ProteinAmbiguityGroup &pag)
 
TextWriteroperator() (const ProteinDetection &pd)
 
TextWriteroperator() (const SpectrumIdentification &si)
 
TextWriteroperator() (const AnalysisCollection &ac)
 
TextWriteroperator() (const SequenceCollection &sc)
 
TextWriteroperator() (const Contact &cont)
 
TextWriteroperator() (const Person &per)
 
TextWriteroperator() (const Organization &org)
 
TextWriteroperator() (const ContactPtr cont)
 
TextWriteroperator() (const std::string &label, const ContactPtr cont)
 
TextWriteroperator() (const ContactRole &cr)
 
TextWriteroperator() (const Provider &provider)
 
TextWriteroperator() (const Sample &sample)
 
TextWriteroperator() (const AnalysisSampleCollection &asc)
 
TextWriteroperator() (const AnalysisSoftwarePtr &asp)
 
TextWriteroperator() (const Enzyme &enzyme)
 
TextWriteroperator() (const Identifiable &id)
 
TextWriteroperator() (const IdentifiableParamContainer &id)
 
TextWriteroperator() (const Residue &res)
 
TextWriteroperator() (const AmbiguousResidue &res)
 
TextWriteroperator() (const Modification &mod)
 
TextWriteroperator() (const Peptide &pep)
 
TextWriteroperator() (const PeptideEvidence &pe)
 
TextWriteroperator() (const IdentData &mzid)
 
TextWriteroperator() (const CV &cv)
 
template<typename object_type >
TextWriteroperator() (const boost::shared_ptr< object_type > &p)
 

Private Member Functions

template<typename object_type >
std::string makeDelimitedRefListString (const std::vector< boost::shared_ptr< object_type > > &objects, const char *delimiter=" ")
 
template<typename object_type >
std::string makeDelimitedListString (const std::vector< object_type > &objects, const char *delimiter=" ")
 

Private Attributes

std::ostream & os_
 
int depth_
 
std::string indent_
 

Detailed Description

Definition at line 44 of file TextWriter.hpp.

Constructor & Destructor Documentation

§ TextWriter()

pwiz::identdata::TextWriter::TextWriter ( std::ostream &  os,
int  depth = 0 
)
inline

Definition at line 48 of file TextWriter.hpp.

References os_.

49  : os_(os), depth_(depth), indent_(depth*2, ' ')
50  {
51  os_.precision(14);
52  }

Member Function Documentation

§ child()

TextWriter pwiz::identdata::TextWriter::child ( )
inline

Definition at line 55 of file TextWriter.hpp.

References os_.

55 {return TextWriter(os_, depth_+1);}
TextWriter(std::ostream &os, int depth=0)
Definition: TextWriter.hpp:48

§ operator()() [1/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const std::string &  text)
inline

Definition at line 58 of file TextWriter.hpp.

References os_.

59  {
60  os_ << indent_ << text << std::endl;
61  return *this;
62  }

§ operator()() [2/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const float  value)
inline

Definition at line 65 of file TextWriter.hpp.

References os_.

66  {
67  os_ << indent_ << value << std::endl;
68  return *this;
69  }
PWIZ_API_DECL std::string value(const std::string &id, const std::string &name)
convenience function to extract a named value from an id string

§ operator()() [3/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const CVParam cvParam)
inline

Definition at line 72 of file TextWriter.hpp.

References pwiz::data::CVParam::cvid, CVID_Unknown, pwiz::cv::cvTermInfo(), pwiz::cv::CVTermInfo::name, os_, pwiz::data::CVParam::units, pwiz::data::CVParam::unitsName(), and pwiz::data::CVParam::value.

73  {
74  os_ << indent_ << "cvParam: " << cvTermInfo(cvParam.cvid).name;
75  if (!cvParam.value.empty())
76  os_ << ", " << cvParam.value;
77  if (cvParam.units != CVID_Unknown)
78  os_ << ", " << cvParam.unitsName();
79  os_ << std::endl;
80  return *this;
81  }
std::string value
Definition: ParamTypes.hpp:47
PWIZ_API_DECL const CVTermInfo & cvTermInfo(CVID cvid)
returns CV term info for the specified CVID
std::string unitsName() const
convenience function to return string for the units
std::string name
Definition: cv.hpp:13385
CVID_Unknown
Definition: cv.hpp:97

§ operator()() [4/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const std::string &  label,
const float &  v 
)
inline

Definition at line 84 of file TextWriter.hpp.

References os_.

85  {
86  os_ << indent_ << label << v << std::endl;
87  return *this;
88  }

§ operator()() [5/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const std::string &  label,
const double &  v 
)
inline

Definition at line 91 of file TextWriter.hpp.

References os_.

92  {
93  os_ << indent_ << label << v << std::endl;
94  return *this;
95  }

§ operator()() [6/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const std::string &  label,
const bool &  v 
)
inline

Definition at line 98 of file TextWriter.hpp.

References os_.

99  {
100  os_ << indent_ << label << std::boolalpha << v << std::endl;
101  return *this;
102  }

§ operator()() [7/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const UserParam userParam)
inline

Definition at line 105 of file TextWriter.hpp.

References CVID_Unknown, pwiz::cv::cvTermInfo(), pwiz::data::UserParam::name, pwiz::cv::CVTermInfo::name, os_, pwiz::data::UserParam::type, pwiz::data::UserParam::units, and pwiz::data::UserParam::value.

106  {
107  os_ << indent_ << "userParam: " << userParam.name;
108  if (!userParam.value.empty()) os_ << ", " << userParam.value;
109  if (!userParam.type.empty()) os_ << ", " << userParam.type;
110  if (userParam.units != CVID_Unknown) os_ << ", " << cvTermInfo(userParam.units).name;
111  os_ << std::endl;
112  return *this;
113  }
PWIZ_API_DECL const CVTermInfo & cvTermInfo(CVID cvid)
returns CV term info for the specified CVID
std::string value
the value for the parameter, where appropriate.
Definition: ParamTypes.hpp:191
std::string type
the datatype of the parameter, where appropriate (e.g.: xsd:float).
Definition: ParamTypes.hpp:194
std::string name
Definition: cv.hpp:13385
std::string name
the name for the parameter.
Definition: ParamTypes.hpp:188
CVID units
an optional CV parameter for the unit term associated with the value, if any (e.g. MS_electron_volt).
Definition: ParamTypes.hpp:197
CVID_Unknown
Definition: cv.hpp:97

§ operator()() [8/64]

template<typename object_type >
TextWriter& pwiz::identdata::TextWriter::operator() ( const std::string &  label,
const std::vector< object_type > &  v 
)
inline

Definition at line 117 of file TextWriter.hpp.

118  {
119  (*this)(label);
120  for_each(v.begin(), v.end(), child());
121  return *this;
122  }

§ operator()() [9/64]

template<typename object_type >
TextWriter& pwiz::identdata::TextWriter::operator() ( const std::vector< object_type > &  v)
inline

Definition at line 126 of file TextWriter.hpp.

127  {
128  for_each(v.begin(), v.end(), child());
129  return *this;
130  }

§ operator()() [10/64]

template<typename object_type >
TextWriter& pwiz::identdata::TextWriter::operator() ( const std::string &  label,
const object_type &  v 
)
inline

Definition at line 134 of file TextWriter.hpp.

References boost::lexical_cast().

135  {
136  (*this)(label + boost::lexical_cast<std::string>(v));
137  return *this;
138  }
float lexical_cast(const std::string &str)

§ operator()() [11/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const std::string &  label,
const ParamContainer paramContainer 
)
inline

Definition at line 141 of file TextWriter.hpp.

References pwiz::data::ParamContainer::cvParams, and pwiz::data::ParamContainer::userParams.

142  {
143  (*this)(label); // + ":"
144  for_each(paramContainer.cvParams.begin(), paramContainer.cvParams.end(), child());
145  for_each(paramContainer.userParams.begin(), paramContainer.userParams.end(), child());
146  return *this;
147  }
std::vector< UserParam > userParams
a collection of uncontrolled user terms
Definition: ParamTypes.hpp:253
std::vector< CVParam > cvParams
a collection of controlled vocabulary terms
Definition: ParamTypes.hpp:250

§ operator()() [12/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const ParamContainer paramContainer)
inline

Definition at line 150 of file TextWriter.hpp.

References pwiz::data::ParamContainer::cvParams, and pwiz::data::ParamContainer::userParams.

151  {
152  for_each(paramContainer.cvParams.begin(), paramContainer.cvParams.end(), *this);
153  for_each(paramContainer.userParams.begin(), paramContainer.userParams.end(), *this);
154  return *this;
155  }
std::vector< UserParam > userParams
a collection of uncontrolled user terms
Definition: ParamTypes.hpp:253
std::vector< CVParam > cvParams
a collection of controlled vocabulary terms
Definition: ParamTypes.hpp:250

§ operator()() [13/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const BibliographicReference br)
inline

Definition at line 158 of file TextWriter.hpp.

References pwiz::identdata::BibliographicReference::authors, pwiz::identdata::BibliographicReference::editor, pwiz::identdata::BibliographicReference::issue, pwiz::identdata::BibliographicReference::pages, pwiz::identdata::BibliographicReference::publication, pwiz::identdata::BibliographicReference::publisher, pwiz::identdata::BibliographicReference::title, pwiz::identdata::BibliographicReference::volume, and pwiz::identdata::BibliographicReference::year.

159  {
160  (*this)("BibliographicReference: ");
161  (*this)((Identifiable)br);
162  if (!br.authors.empty())
163  child()("authors: "+br.authors);
164  if (!br.publication.empty())
165  child()("publication: "+br.publication);
166  if (!br.publisher.empty())
167  child()(br.publisher);
168  if (!br.editor.empty())
169  child()("editor: "+br.editor);
170  if (br.year != 0)
171  child()("year: ", br.year);
172  if (!br.volume.empty())
173  child()("volume: "+br.volume);
174  if (!br.issue.empty())
175  child()("issue: "+br.issue);
176  if (!br.pages.empty())
177  child()("pages: "+br.pages);
178  if (!br.title.empty())
179  child()("title: "+br.title);
180 
181  return *this;
182  }

§ operator()() [14/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const TranslationTable tt)
inline

Definition at line 185 of file TextWriter.hpp.

186  {
187  (*this)("TranslationTable:");
188  (*this)((const IdentifiableParamContainer&)tt);
189  return *this;
190  }

§ operator()() [15/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const DatabaseTranslation dt)
inline

Definition at line 193 of file TextWriter.hpp.

References pwiz::identdata::DatabaseTranslation::frames, and pwiz::identdata::DatabaseTranslation::translationTable.

194  {
195  (*this)("DatabaseTranslation:");
196  if (!dt.frames.empty())
197  child()("frames: ", dt.frames);
198  if (!dt.translationTable.empty())
199  child()("translationTable: ", dt.translationTable);
200  return *this;
201  }

§ operator()() [16/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const SpectrumIdentificationProtocol si)
inline

Definition at line 204 of file TextWriter.hpp.

References pwiz::identdata::SpectrumIdentificationProtocol::additionalSearchParams, pwiz::identdata::SpectrumIdentificationProtocol::analysisSoftwarePtr, pwiz::identdata::SpectrumIdentificationProtocol::databaseFilters, pwiz::identdata::SpectrumIdentificationProtocol::databaseTranslation, pwiz::data::CVParam::empty(), pwiz::data::ParamContainer::empty(), pwiz::identdata::Enzymes::empty(), pwiz::identdata::SpectrumIdentificationProtocol::enzymes, pwiz::identdata::SpectrumIdentificationProtocol::fragmentTolerance, pwiz::identdata::SpectrumIdentificationProtocol::massTable, pwiz::identdata::SpectrumIdentificationProtocol::modificationParams, pwiz::identdata::SpectrumIdentificationProtocol::parentTolerance, pwiz::identdata::SpectrumIdentificationProtocol::searchType, and pwiz::identdata::SpectrumIdentificationProtocol::threshold.

205  {
206  (*this)("SpectrumIdentificationProtocol:");
207  (*this)((Identifiable&)si);
208  if (si.analysisSoftwarePtr.get() &&
209  !si.analysisSoftwarePtr->empty())
210  child()("analysisSoftware_ref: "+si.analysisSoftwarePtr->id);
211  if (!si.searchType.empty())
212  child()("SearchType: ", si.searchType);
213  if (!si.additionalSearchParams.empty())
214  child()("AdditionalSearchParams", si.additionalSearchParams);
215  if (!si.modificationParams.empty())
216  child()("ModificationParams", si.modificationParams);
217  if (!si.enzymes.empty())
218  child()(si.enzymes);
219  if (!si.massTable.empty())
220  child()(si.massTable);
221  if (!si.fragmentTolerance.empty())
222  child()("FragmentTolerance", si.fragmentTolerance);
223  if (!si.parentTolerance.empty())
224  child()("ParentTolerance", si.parentTolerance);
225  if (!si.threshold.empty())
226  child()("Threshold", si.threshold);
227  if (!si.databaseFilters.empty())
228  child()("DatabaseFilters", si.databaseFilters);
229  if (si.databaseTranslation.get() && !si.databaseTranslation->empty())
230  child()("DatabaseTranslation", si.databaseTranslation);
231 
232  return *this;
233  }

§ operator()() [17/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const DBSequence ds)
inline

Definition at line 236 of file TextWriter.hpp.

References pwiz::identdata::DBSequence::accession, pwiz::identdata::DBSequence::length, pwiz::identdata::DBSequence::searchDatabasePtr, and pwiz::identdata::DBSequence::seq.

237  {
238  (*this)("DBSequence: ");
239  (*this)((const IdentifiableParamContainer&)ds);
240  if (ds.length!=0)
241  child()("length: ", ds.length);
242  if (!ds.accession.empty())
243  child()("accession: "+ds.accession);
244  if (ds.searchDatabasePtr.get() && !ds.searchDatabasePtr->empty())
245  child()("searchDatabase_ref: "+ds.searchDatabasePtr->id);
246  if (!ds.seq.empty())
247  child()("Seq: "+ds.seq);
248 
249  return *this;
250  }

§ operator()() [18/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const SubstitutionModification ds)
inline

Definition at line 253 of file TextWriter.hpp.

References pwiz::identdata::SubstitutionModification::avgMassDelta, pwiz::identdata::SubstitutionModification::location, pwiz::identdata::SubstitutionModification::monoisotopicMassDelta, pwiz::identdata::SubstitutionModification::originalResidue, and pwiz::identdata::SubstitutionModification::replacementResidue.

254  {
255  (*this)("SubstitutionModification: ");
256  if (ds.originalResidue != 0)
257  child()("originalResidue: ", ds.originalResidue);
258  if (ds.replacementResidue != 0)
259  child()("replacementResidue: ", ds.replacementResidue);
260  if (ds.location != 0)
261  child()("location: ", ds.location);
262  child()("avgMassDelta: ", ds.avgMassDelta);
263  child()("monoisotopicMassDelta: ", ds.monoisotopicMassDelta);
264 
265  return *this;
266  }

§ operator()() [19/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const IonType it)
inline

Definition at line 269 of file TextWriter.hpp.

References pwiz::identdata::IonType::charge, pwiz::identdata::IonType::fragmentArray, and pwiz::identdata::IonType::index.

270  {
271  (*this)("IonType: ");
272  if (!it.index.empty())
273  child()("index: " + makeDelimitedListString(it.index));
274  if (it.charge != 0)
275  child()("charge: ", it.charge);
276  if (!it.fragmentArray.empty())
277  (*this)(it.fragmentArray);
278  (*this)((const CVParam&)it);
279  return *this;
280  }
std::string makeDelimitedListString(const std::vector< object_type > &objects, const char *delimiter=" ")
Definition: TextWriter.hpp:949
represents a tag-value pair, where the tag comes from the controlled vocabulary
Definition: ParamTypes.hpp:44

§ operator()() [20/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Measure m)
inline

Definition at line 283 of file TextWriter.hpp.

284  {
285  (*this)("Measure: ");
286  (*this)((const ParamContainer&)m);
287 
288  return *this;
289  }
The base class for elements that may contain cvParams, userParams, or paramGroup references.
Definition: ParamTypes.hpp:244

§ operator()() [21/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const SearchDatabase sd)
inline

Definition at line 292 of file TextWriter.hpp.

References pwiz::identdata::SearchDatabase::databaseName, pwiz::data::CVParam::empty(), pwiz::data::ParamContainer::empty(), pwiz::identdata::SearchDatabase::fileFormat, pwiz::identdata::SearchDatabase::location, pwiz::identdata::SearchDatabase::numDatabaseSequences, pwiz::identdata::SearchDatabase::numResidues, pwiz::identdata::SearchDatabase::releaseDate, and pwiz::identdata::SearchDatabase::version.

293  {
294  (*this)("SearchDatabase: ");
295  (*this)((const IdentifiableParamContainer&)sd);
296  if (!sd.location.empty())
297  child()("location: " + sd.location);
298  if (!sd.version.empty())
299  child()("version: " + sd.version);
300  if (!sd.releaseDate.empty())
301  child()("releaseDate: " + sd.releaseDate);
302  if (sd.numDatabaseSequences != 0)
303  child()("numDatabaseSequences: ", sd.numDatabaseSequences);
304  if (sd.numResidues != 0)
305  child()("numResidues: ", sd.numResidues);
306  if (!sd.fileFormat.empty())
307  child()("FileFormat: ", sd.fileFormat);
308  if (!sd.databaseName.empty())
309  child()("DatabaseName: ", sd.databaseName);
310  return *this;
311  }

§ operator()() [22/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const SpectraData sd)
inline

Definition at line 314 of file TextWriter.hpp.

References pwiz::data::CVParam::empty(), pwiz::identdata::SpectraData::externalFormatDocumentation, pwiz::identdata::SpectraData::fileFormat, pwiz::identdata::SpectraData::location, and pwiz::identdata::SpectraData::spectrumIDFormat.

315  {
316  (*this)("SpectraData: ");
317  if (!sd.location.empty())
318  child()("location: " + sd.location);
319  if (!sd.externalFormatDocumentation.empty())
320  child()("ExternalFormatDocumentation: ", sd.externalFormatDocumentation);
321  if (!sd.fileFormat.empty())
322  child()("FileFormat: ", sd.fileFormat);
323  if (!sd.spectrumIDFormat.empty())
324  child()("SpectrumIDFormat: ", sd.spectrumIDFormat);
325  return *this;
326  }

§ operator()() [23/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const SpectrumIdentificationItem sii)
inline

Definition at line 329 of file TextWriter.hpp.

References pwiz::identdata::SpectrumIdentificationItem::calculatedMassToCharge, pwiz::identdata::SpectrumIdentificationItem::calculatedPI, pwiz::identdata::SpectrumIdentificationItem::chargeState, pwiz::identdata::SpectrumIdentificationItem::empty(), pwiz::identdata::SpectrumIdentificationItem::experimentalMassToCharge, pwiz::identdata::SpectrumIdentificationItem::fragmentation, pwiz::identdata::IdentifiableParamContainer::id, pwiz::identdata::SpectrumIdentificationItem::massTablePtr, pwiz::identdata::IdentifiableParamContainer::name, pwiz::identdata::SpectrumIdentificationItem::passThreshold, pwiz::identdata::SpectrumIdentificationItem::peptideEvidencePtr, pwiz::identdata::SpectrumIdentificationItem::peptidePtr, pwiz::identdata::SpectrumIdentificationItem::rank, and pwiz::identdata::SpectrumIdentificationItem::samplePtr.

330  {
331  (*this)("SpectrumIdentificationItem:");
332  if (!sii.id.empty())
333  child()("id: ", sii.id);
334  if (!sii.name.empty())
335  child()("name: ", sii.name);
336  if (!sii.empty())
337  {
338  child()("rank: ", sii.rank);
339  child()("chargeState: ", sii.chargeState);
340  child()("experimentalMassToCharge: ", sii.experimentalMassToCharge);
341  child()("calculatedMassToCharge: ", sii.calculatedMassToCharge);
342  child()("calculatedPI: ", sii.calculatedPI);
343  child()("passThreshold: ", sii.passThreshold);
344  }
345  if (sii.peptidePtr.get() && !sii.peptidePtr->empty())
346  child()("peptide_ref: ", sii.peptidePtr->id);
347  if (sii.massTablePtr.get() && !sii.massTablePtr->empty())
348  child()("massTable_ref: ", sii.massTablePtr->id);
349  if (sii.samplePtr.get() && !sii.samplePtr->empty())
350  child()("sample_ref: ", sii.samplePtr->id);
351 
352  BOOST_FOREACH(const PeptideEvidencePtr& pe, sii.peptideEvidencePtr)
353  if (pe.get() && !pe->empty())
354  child()("peptideEvidence_ref: ", pe->id);
355 
356  if (!sii.fragmentation.empty())
357  child()("fragmentation", sii.fragmentation);
358 
359  child()((const ParamContainer&)sii);
360 
361  return *this;
362  }
T get(const char *name, const T &defaultValue)
Definition: Environment.hpp:34
The base class for elements that may contain cvParams, userParams, or paramGroup references.
Definition: ParamTypes.hpp:244

§ operator()() [24/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const SpectrumIdentificationResult sir)
inline

Definition at line 365 of file TextWriter.hpp.

References pwiz::identdata::SpectrumIdentificationResult::spectraDataPtr, pwiz::identdata::SpectrumIdentificationResult::spectrumID, and pwiz::identdata::SpectrumIdentificationResult::spectrumIdentificationItem.

366  {
367  (*this)("SpectrumIdentificationResult: ");
368  (*this)((const IdentifiableParamContainer&)sir);
369  if (!sir.spectrumID.empty())
370  child()("spectrumID: "+sir.spectrumID);
371  if (sir.spectraDataPtr.get() && !sir.spectraDataPtr->empty())
372  child()("spectraData_ref: "+sir.spectraDataPtr->id);
373  if (!sir.spectrumIdentificationItem.empty())
374  (*this)(sir.spectrumIdentificationItem);
375 
376  return *this;
377  }

§ operator()() [25/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const SpectrumIdentificationList sil)
inline

Definition at line 380 of file TextWriter.hpp.

References pwiz::identdata::SpectrumIdentificationList::empty(), pwiz::identdata::SpectrumIdentificationList::fragmentationTable, pwiz::identdata::SpectrumIdentificationList::numSequencesSearched, and pwiz::identdata::SpectrumIdentificationList::spectrumIdentificationResult.

381  {
382  (*this)("SpectrumIdentificationList: ");
383  (*this)((const IdentifiableParamContainer&)sil);
384  if (!sil.empty())
385  child()("numSequencesSearched: ", sil.numSequencesSearched);
386  if (!sil.fragmentationTable.empty())
387  child()("FragmentationTable", sil.fragmentationTable);
388  if (!sil.spectrumIdentificationResult.empty())
389  (*this)(sil.spectrumIdentificationResult);
390  return *this;
391  }

§ operator()() [26/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const ProteinDetectionList pdl)
inline

Definition at line 394 of file TextWriter.hpp.

References pwiz::identdata::ProteinDetectionList::proteinAmbiguityGroup.

395  {
396  (*this)("ProteinDetectionList: ");
397  if (!pdl.proteinAmbiguityGroup.empty())
398  (*this)(pdl.proteinAmbiguityGroup);
399  (*this)((const ParamContainer&)pdl);
400  return *this;
401  }
The base class for elements that may contain cvParams, userParams, or paramGroup references.
Definition: ParamTypes.hpp:244

§ operator()() [27/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const AnalysisData ad)
inline

Definition at line 404 of file TextWriter.hpp.

References pwiz::identdata::AnalysisData::proteinDetectionListPtr, and pwiz::identdata::AnalysisData::spectrumIdentificationList.

405  {
406  (*this)("AnalysisData: ");
407 
408  if (!ad.spectrumIdentificationList.empty())
409  (*this)(ad.spectrumIdentificationList);
410  if (ad.proteinDetectionListPtr.get() &&
411  !ad.proteinDetectionListPtr->empty())
412  (*this)(*ad.proteinDetectionListPtr);
413 
414  return *this;
415  }

§ operator()() [28/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const FragmentArray fa)
inline

Definition at line 418 of file TextWriter.hpp.

References pwiz::identdata::FragmentArray::measurePtr, and pwiz::identdata::FragmentArray::values.

419  {
420  (*this)("FragmentArray: ");
421 
422  if (fa.measurePtr.get() && !fa.measurePtr->empty())
423  child()("measure_ref: " + fa.measurePtr->id);
424  if (!fa.values.empty())
425  child()("values: " + makeDelimitedListString(fa.values));
426 
427  return *this;
428  }
std::string makeDelimitedListString(const std::vector< object_type > &objects, const char *delimiter=" ")
Definition: TextWriter.hpp:949

§ operator()() [29/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const SourceFile sf)
inline

Definition at line 431 of file TextWriter.hpp.

References pwiz::data::CVParam::empty(), pwiz::identdata::SourceFile::externalFormatDocumentation, pwiz::identdata::SourceFile::fileFormat, and pwiz::identdata::SourceFile::location.

432  {
433  //(*this)("sourceFile: ");
434 
435  (*this)((const IdentifiableParamContainer&)sf);
436  if (!sf.location.empty())
437  child()("location: " + sf.location);
438  if (!sf.fileFormat.empty())
439  child()(sf.fileFormat);
440  if (!sf.externalFormatDocumentation.empty())
441  child()("externalFormatDocumentation: ",
442  sf.externalFormatDocumentation);
443 
444  return *this;
445  }

§ operator()() [30/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Inputs inputs)
inline

Definition at line 448 of file TextWriter.hpp.

References pwiz::identdata::Inputs::searchDatabase, pwiz::identdata::Inputs::sourceFile, and pwiz::identdata::Inputs::spectraData.

449  {
450  (*this)("Inputs: ");
451 
452  if (!inputs.sourceFile.empty())
453  child()("sourceFile: ", inputs.sourceFile);
454  if (!inputs.searchDatabase.empty())
455  child()("searchDatabase: ", inputs.searchDatabase);
456  if (!inputs.spectraData.empty())
457  child()("spectraData: ", inputs.spectraData);
458 
459  return *this;
460  }

§ operator()() [31/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const DataCollection dc)
inline

Definition at line 463 of file TextWriter.hpp.

References pwiz::identdata::DataCollection::analysisData, pwiz::identdata::Inputs::empty(), pwiz::identdata::AnalysisData::empty(), and pwiz::identdata::DataCollection::inputs.

464  {
465  (*this)("DataCollection: ");
466 
467  if (!dc.inputs.empty())
468  child()(dc.inputs);
469  if (!dc.analysisData.empty())
470  child()(dc.analysisData);
471 
472  return *this;
473  }

§ operator()() [32/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Filter f)
inline

Definition at line 476 of file TextWriter.hpp.

References pwiz::data::ParamContainer::empty(), pwiz::identdata::Filter::exclude, pwiz::identdata::Filter::filterType, and pwiz::identdata::Filter::include.

477  {
478  (*this)("Filter: ");
479  if (!f.filterType.empty())
480  child()("filterType: ", f.filterType);
481  if (!f.include.empty())
482  child()("include: ", f.include);
483  if (!f.exclude.empty())
484  child()("exclude: ", f.exclude);
485  return *this;
486  }

§ operator()() [33/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const SearchModification sm)
inline

Definition at line 489 of file TextWriter.hpp.

References pwiz::data::CVParam::empty(), pwiz::identdata::SearchModification::fixedMod, pwiz::identdata::SearchModification::massDelta, pwiz::identdata::SearchModification::residues, and pwiz::identdata::SearchModification::specificityRules.

490  {
491  (*this)("SearchModification: ");
492  if (sm.fixedMod != 0)
493  child()("fixedMod: ", sm.fixedMod);
494  if (sm.massDelta != 0)
495  child()("massDelta: ", sm.massDelta);
496  if (!sm.residues.empty())
497  child()("residues: " + makeDelimitedListString(sm.residues));
498  if (!sm.specificityRules.empty())
499  child()("specificityRules: ", sm.specificityRules);
500  child()((const ParamContainer&)sm);
501  return *this;
502  }
std::string makeDelimitedListString(const std::vector< object_type > &objects, const char *delimiter=" ")
Definition: TextWriter.hpp:949
The base class for elements that may contain cvParams, userParams, or paramGroup references.
Definition: ParamTypes.hpp:244

§ operator()() [34/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Enzymes ezs)
inline

Definition at line 505 of file TextWriter.hpp.

References pwiz::identdata::Enzymes::enzymes, and pwiz::identdata::Enzymes::independent.

506  {
507  (*this)("Enzymes: ");
508  if (!indeterminate(ezs.independent))
509  child()("independent: ", ezs.independent);
510  if (!ezs.enzymes.empty())
511  child()("enzymes: ", ezs.enzymes);
512  return *this;
513  }

§ operator()() [35/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const MassTable mt)
inline

Definition at line 516 of file TextWriter.hpp.

References pwiz::identdata::MassTable::ambiguousResidue, pwiz::identdata::MassTable::id, pwiz::identdata::MassTable::msLevel, and pwiz::identdata::MassTable::residues.

517  {
518  (*this)("MassTable: ");
519  if (!mt.id.empty())
520  child()("id: " + mt.id);
521  if (!mt.msLevel.empty())
522  child()("msLevel: ", mt.msLevel);
523  if (!mt.residues.empty())
524  child()("residues: ", mt.residues);
525  if (!mt.ambiguousResidue.empty())
526  child()("ambiguousResidue: ", mt.residues);
527  return *this;
528  }

§ operator()() [36/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const AnalysisProtocolCollection apc)
inline

Definition at line 531 of file TextWriter.hpp.

References pwiz::identdata::AnalysisProtocolCollection::proteinDetectionProtocol, and pwiz::identdata::AnalysisProtocolCollection::spectrumIdentificationProtocol.

532  {
533  (*this)("AnalysisProtocolCollection: ");
534  if (!apc.spectrumIdentificationProtocol.empty())
535  child()("spectrumIdentificationProtocol: ",
536  apc.spectrumIdentificationProtocol);
537  if (!apc.proteinDetectionProtocol.empty())
538  child()("proteinDetectionProtocol: ",
539  apc.proteinDetectionProtocol);
540  return *this;
541  }

§ operator()() [37/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const PeptideHypothesis ph)
inline

Definition at line 544 of file TextWriter.hpp.

References pwiz::identdata::PeptideHypothesis::peptideEvidencePtr, and pwiz::identdata::PeptideHypothesis::spectrumIdentificationItemPtr.

545  {
546  (*this)("PeptideHypothesis: ");
547 
548  if (ph.peptideEvidencePtr.get())
549  child()("peptideEvidence: ", ph.peptideEvidencePtr->id);
550  child()("spectrumIdentificationItem: " + makeDelimitedRefListString(ph.spectrumIdentificationItemPtr));
551  return *this;
552  }
std::string makeDelimitedRefListString(const std::vector< boost::shared_ptr< object_type > > &objects, const char *delimiter=" ")
Definition: TextWriter.hpp:937

§ operator()() [38/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const ProteinDetectionHypothesis pdh)
inline

Definition at line 555 of file TextWriter.hpp.

References pwiz::identdata::ProteinDetectionHypothesis::dbSequencePtr, and pwiz::identdata::ProteinDetectionHypothesis::peptideHypothesis.

556  {
557  (*this)("ProteinDetectionHypothesis: ");
558  if (pdh.dbSequencePtr.get() && !pdh.dbSequencePtr->empty())
559  child()("DBSequence_ref: " + pdh.dbSequencePtr->id);
560  // TODO: Resolve if (!pdh.passThreshold.empty())
561  // child()("passThreshold: " + boost::lexical_cast<std::string>(pdh.passThreshold));
562  if (!pdh.peptideHypothesis.empty())
563  (*this)(pdh.peptideHypothesis);
564 
565  child()((const ParamContainer&)pdh);
566  return *this;
567  }
The base class for elements that may contain cvParams, userParams, or paramGroup references.
Definition: ParamTypes.hpp:244

§ operator()() [39/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const ProteinAmbiguityGroup pag)
inline

Definition at line 570 of file TextWriter.hpp.

References pwiz::identdata::ProteinAmbiguityGroup::proteinDetectionHypothesis.

571  {
572  (*this)("ProteinAmbiguityGroup: ");
573  if (!pag.proteinDetectionHypothesis.empty())
574  (*this)(pag.proteinDetectionHypothesis);
575  (*this)((const ParamContainer&)pag);
576 
577  return *this;
578  }
The base class for elements that may contain cvParams, userParams, or paramGroup references.
Definition: ParamTypes.hpp:244

§ operator()() [40/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const ProteinDetection pd)
inline

Definition at line 581 of file TextWriter.hpp.

References pwiz::identdata::ProteinDetection::activityDate, pwiz::identdata::ProteinDetection::inputSpectrumIdentifications, pwiz::identdata::ProteinDetection::proteinDetectionListPtr, and pwiz::identdata::ProteinDetection::proteinDetectionProtocolPtr.

582  {
583  (*this)("ProteinDetection: ");
584  if (pd.proteinDetectionProtocolPtr.get() &&
585  !pd.proteinDetectionProtocolPtr->empty())
586  child()("proteinDetectionProtocol_ref: "+pd.proteinDetectionProtocolPtr->id);
587  if (pd.proteinDetectionListPtr.get() &&
588  !pd.proteinDetectionListPtr->empty())
589  child()("proteinDetectionList_ref: "+pd.proteinDetectionListPtr->id);
590  if (!pd.activityDate.empty())
591  child()("activityDate: "+pd.activityDate);
592  child()("inputSpectrumIdentifications: " + makeDelimitedRefListString(pd.inputSpectrumIdentifications));
593  return *this;
594  }
std::string makeDelimitedRefListString(const std::vector< boost::shared_ptr< object_type > > &objects, const char *delimiter=" ")
Definition: TextWriter.hpp:937

§ operator()() [41/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const SpectrumIdentification si)
inline

Definition at line 597 of file TextWriter.hpp.

References pwiz::identdata::SpectrumIdentification::activityDate, pwiz::identdata::SpectrumIdentification::inputSpectra, pwiz::identdata::SpectrumIdentification::searchDatabase, pwiz::identdata::SpectrumIdentification::spectrumIdentificationListPtr, and pwiz::identdata::SpectrumIdentification::spectrumIdentificationProtocolPtr.

598  {
599  (*this)("SpectrumIdentification: ");
600  if (si.spectrumIdentificationProtocolPtr.get() &&
601  !si.spectrumIdentificationProtocolPtr->empty())
602  child()("spectrumIdentificationProtocol_ref: "+si.spectrumIdentificationProtocolPtr->id);
603  if (si.spectrumIdentificationListPtr.get() &&
604  !si.spectrumIdentificationListPtr->empty())
605  child()("spectrumIdentificationList_ref: "+si.spectrumIdentificationListPtr->id);
606  if (!si.activityDate.empty())
607  child()("activityDate: "+si.activityDate);
608  if (!si.inputSpectra.empty())
609  child()("inputSpectra: " + makeDelimitedRefListString(si.inputSpectra));
610  if (!si.searchDatabase.empty())
611  child()("searchDatabase: " + makeDelimitedRefListString(si.searchDatabase));
612 
613  return *this;
614  }
std::string makeDelimitedRefListString(const std::vector< boost::shared_ptr< object_type > > &objects, const char *delimiter=" ")
Definition: TextWriter.hpp:937

§ operator()() [42/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const AnalysisCollection ac)
inline

Definition at line 617 of file TextWriter.hpp.

References pwiz::identdata::ProteinDetection::empty(), pwiz::identdata::AnalysisCollection::proteinDetection, and pwiz::identdata::AnalysisCollection::spectrumIdentification.

618  {
619  (*this)("AnalysisCollection: ", ac.spectrumIdentification);
620  if (!ac.proteinDetection.empty())
621  child()(ac.proteinDetection);
622  return *this;
623  }

§ operator()() [43/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const SequenceCollection sc)
inline

Definition at line 626 of file TextWriter.hpp.

References pwiz::identdata::SequenceCollection::dbSequences, pwiz::identdata::SequenceCollection::peptideEvidence, and pwiz::identdata::SequenceCollection::peptides.

627  {
628  (*this)("SequenceCollection: ");
629  if (!sc.dbSequences.empty())
630  child()("dbSequences: ", sc.dbSequences);
631  if (!sc.peptides.empty())
632  child()("peptides: ", sc.peptides);
633  if (!sc.peptideEvidence.empty())
634  child()("peptideEvidence: ", sc.peptideEvidence);
635  return *this;
636  }

§ operator()() [44/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Contact cont)
inline

Definition at line 639 of file TextWriter.hpp.

640  {
641  (*this)((const IdentifiableParamContainer&)cont);
642 
643  return *this;
644  }

§ operator()() [45/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Person per)
inline

Definition at line 647 of file TextWriter.hpp.

References pwiz::identdata::Person::affiliations, pwiz::identdata::Person::firstName, pwiz::identdata::Person::lastName, and pwiz::identdata::Person::midInitials.

648  {
649  (*this)("Person: ");
650  (*this)((const Contact&)per);
651  if (!per.lastName.empty())
652  child()("lastName: "+per.lastName);
653  if (!per.firstName.empty())
654  child()("firstName: "+per.firstName);
655  if (!per.midInitials.empty())
656  child()("midInitials: "+per.midInitials);
657  if (!per.affiliations.empty())
658  child()("affiliations: ", per.affiliations);
659 
660  return *this;
661  }

§ operator()() [46/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Organization org)
inline

Definition at line 664 of file TextWriter.hpp.

References pwiz::identdata::Organization::parent.

665  {
666  (*this)("Organization: ");
667  (*this)((const Contact&)org);
668  if (org.parent.get())
669  child()("Parent: ", org.parent->id);
670 
671  return *this;
672  }

§ operator()() [47/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const ContactPtr  cont)
inline

Definition at line 675 of file TextWriter.hpp.

676  {
677  if (dynamic_cast<Person*>(cont.get()))
678  (*this)((const Person&)(*cont));
679  else if (dynamic_cast<Organization*>(cont.get()))
680  (*this)((const Organization&)(*cont));
681  else
682  (*this)(*cont);
683 
684  return *this;
685  }

§ operator()() [48/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const std::string &  label,
const ContactPtr  cont 
)
inline

Definition at line 688 of file TextWriter.hpp.

689  {
690  (*this)(label);
691  (*this)(cont);
692 
693  return *this;
694  }

§ operator()() [49/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const ContactRole cr)
inline

Definition at line 697 of file TextWriter.hpp.

References pwiz::identdata::ContactRole::contactPtr.

698  {
699  (*this)("ContactRole: ");
700  if (cr.contactPtr.get() && !cr.contactPtr->empty())
701  child()("contact_ref: ", cr.contactPtr->id);
702  if (!cr.CVParam::empty())
703  child()("Role: ", (const CVParam&)cr);
704  return (*this);
705  }
represents a tag-value pair, where the tag comes from the controlled vocabulary
Definition: ParamTypes.hpp:44

§ operator()() [50/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Provider provider)
inline

Definition at line 708 of file TextWriter.hpp.

References pwiz::identdata::Provider::contactRolePtr.

709  {
710  (*this)("Provider: ");
711  (*this)((Identifiable&)provider);
712  if (provider.contactRolePtr.get() && !provider.contactRolePtr->empty())
713  child()(provider.contactRolePtr);
714  return *this;
715  }

§ operator()() [51/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Sample sample)
inline

Definition at line 718 of file TextWriter.hpp.

References pwiz::identdata::Sample::contactRole, pwiz::data::ParamContainer::cvParams, and pwiz::identdata::Sample::subSamples.

719  {
720  (*this)("Sample: ");
721  (*this)((const IdentifiableParamContainer&)sample);
722  (*this)(sample.contactRole);
723  child()(sample.cvParams);
724  child()("SubSamples:", sample.subSamples);
725 
726  return *this;
727  }

§ operator()() [52/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const AnalysisSampleCollection asc)
inline

Definition at line 730 of file TextWriter.hpp.

References pwiz::identdata::AnalysisSampleCollection::samples.

731  {
732  (*this)("AnalysisSampleCollection: ", asc.samples);
733 
734  return *this;
735  }

§ operator()() [53/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const AnalysisSoftwarePtr &  asp)
inline

Definition at line 738 of file TextWriter.hpp.

739  {
740  (*this)("analysisSoftware:");
741  (*this)((Identifiable)*asp);
742  if (!asp->version.empty())
743  child()("version: "+asp->version);
744  if (asp->contactRolePtr.get() && asp->contactRolePtr->empty())
745  child()(*asp->contactRolePtr);
746  if (!asp->softwareName.empty())
747  child()("softwareName: ", asp->softwareName);
748  if (!asp->URI.empty())
749  child()("uri: "+asp->URI);
750  if (!asp->customizations.empty())
751  child()("customizations: "+asp->customizations);
752  return *this;
753  }

§ operator()() [54/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Enzyme enzyme)
inline

Definition at line 756 of file TextWriter.hpp.

References pwiz::identdata::Enzyme::cTermGain, pwiz::data::ParamContainer::empty(), pwiz::identdata::Enzyme::enzymeName, pwiz::identdata::Identifiable::id, pwiz::identdata::Enzyme::minDistance, pwiz::identdata::Enzyme::missedCleavages, pwiz::identdata::Enzyme::nTermGain, pwiz::identdata::Enzyme::siteRegexp, and pwiz::identdata::Enzyme::terminalSpecificity.

757  {
758  (*this)("Enzyme: ");
759  if (!enzyme.id.empty())
760  child()("id: "+enzyme.id);
761  if (!enzyme.nTermGain.empty())
762  child()("nTermGain: "+enzyme.nTermGain);
763  if (!enzyme.cTermGain.empty())
764  child()("cTermGain: "+enzyme.cTermGain);
765  child()("semiSpecific: ", (enzyme.terminalSpecificity != proteome::Digestion::FullySpecific ? "true": "false"));
766  if (enzyme.missedCleavages != 0)
767  child()("missedCleavages: ", enzyme.missedCleavages);
768  if (enzyme.minDistance != 0)
769  child()("minDistance: ", enzyme.minDistance);
770  if (!enzyme.siteRegexp.empty())
771  child()("SiteRegexp: "+enzyme.siteRegexp);
772  if (!enzyme.enzymeName.empty())
773  child()("EnzymeName: ", enzyme.enzymeName);
774 
775  return *this;
776  }

§ operator()() [55/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Identifiable id)
inline

Definition at line 779 of file TextWriter.hpp.

780  {
781  if (!id.id.empty())
782  child()("id: "+id.id);
783  if (!id.name.empty())
784  child()("name: "+id.name);
785 
786  return *this;
787  }

§ operator()() [56/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const IdentifiableParamContainer id)
inline

Definition at line 790 of file TextWriter.hpp.

791  {
792  if (!id.id.empty())
793  child()("id: "+id.id);
794  if (!id.name.empty())
795  child()("name: "+id.name);
796 
797  child()((const ParamContainer&)id);
798 
799  return *this;
800  }
The base class for elements that may contain cvParams, userParams, or paramGroup references.
Definition: ParamTypes.hpp:244

§ operator()() [57/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Residue res)
inline

Definition at line 803 of file TextWriter.hpp.

References pwiz::identdata::Residue::code, and pwiz::identdata::Residue::mass.

804  {
805  (*this)("Residue: ");
806  if (res.code != 0)
807  child()("code: ", res.code);
808  if (res.mass != 0)
809  child()("mass: ", res.mass);
810  return *this;
811  }

§ operator()() [58/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const AmbiguousResidue res)
inline

Definition at line 814 of file TextWriter.hpp.

References pwiz::identdata::AmbiguousResidue::code.

815  {
816  (*this)("AmbiguousResidue: ");
817  if (res.code != 0)
818  child()("code: ", res.code);
819  (*this)((const ParamContainer&)res);
820 
821  return *this;
822  }
The base class for elements that may contain cvParams, userParams, or paramGroup references.
Definition: ParamTypes.hpp:244

§ operator()() [59/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Modification mod)
inline

Definition at line 825 of file TextWriter.hpp.

References pwiz::identdata::Modification::avgMassDelta, pwiz::identdata::Modification::location, pwiz::identdata::Modification::monoisotopicMassDelta, and pwiz::identdata::Modification::residues.

826  {
827  (*this)("Modification: ");
828  if (mod.location != 0)
829  child()("location: ", mod.location);
830  if (!mod.residues.empty())
831  child()("residues: " + makeDelimitedListString(mod.residues));
832  if (mod.avgMassDelta != 0)
833  child()("avgMassDelta: ", mod.avgMassDelta);
834  if (mod.monoisotopicMassDelta != 0)
835  child()("monoisotopicMassDelta: ", mod.monoisotopicMassDelta);
836  child()((const ParamContainer&)mod);
837 
838  return *this;
839  }
std::string makeDelimitedListString(const std::vector< object_type > &objects, const char *delimiter=" ")
Definition: TextWriter.hpp:949
The base class for elements that may contain cvParams, userParams, or paramGroup references.
Definition: ParamTypes.hpp:244

§ operator()() [60/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const Peptide pep)
inline

Definition at line 842 of file TextWriter.hpp.

References pwiz::identdata::Peptide::modification, pwiz::identdata::Peptide::peptideSequence, and pwiz::identdata::Peptide::substitutionModification.

843  {
844  (*this)("Peptide: ");
845  (*this)((const IdentifiableParamContainer&)pep);
846  if (!pep.peptideSequence.empty())
847  child()("peptideSequence: "+pep.peptideSequence);
848  if (!pep.modification.empty())
849  child()("modification", pep.modification);
850  if (!pep.substitutionModification.empty())
851  child()(pep.substitutionModification);
852 
853  return *this;
854  }

§ operator()() [61/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const PeptideEvidence pe)
inline

Definition at line 857 of file TextWriter.hpp.

References pwiz::identdata::PeptideEvidence::dbSequencePtr, pwiz::identdata::PeptideEvidence::end, pwiz::identdata::PeptideEvidence::frame, pwiz::identdata::PeptideEvidence::isDecoy, pwiz::identdata::PeptideEvidence::peptidePtr, pwiz::identdata::PeptideEvidence::post, pwiz::identdata::PeptideEvidence::pre, pwiz::identdata::PeptideEvidence::start, and pwiz::identdata::PeptideEvidence::translationTablePtr.

858  {
859  (*this)("PeptideEvidence: ");
860  (*this)((const IdentifiableParamContainer&)pe);
861  if (pe.peptidePtr.get() && !pe.peptidePtr->empty())
862  child()("peptide_ref: "+pe.peptidePtr->id);
863  if (pe.dbSequencePtr.get() && !pe.dbSequencePtr->empty())
864  child()("dBSequence_ref: "+pe.dbSequencePtr->id);
865  if (pe.start != 0)
866  child()("start: ", pe.start);
867  if (pe.end != 0)
868  child()("end: ", pe.end);
869  if (pe.pre != 0)
870  child()("pre: ", pe.pre);
871  if (pe.post != 0)
872  child()("post: ", pe.post);
873  if (pe.translationTablePtr.get() && !pe.translationTablePtr->empty())
874  child()("translationTable_ref: "+pe.translationTablePtr->id);
875  if (pe.frame != 0)
876  child()("frame: ", pe.frame);
877  child()("isDecoy: ", pe.isDecoy);
878 
879  return *this;
880  }

§ operator()() [62/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const IdentData mzid)
inline

Definition at line 883 of file TextWriter.hpp.

References pwiz::identdata::IdentData::analysisCollection, pwiz::identdata::IdentData::analysisProtocolCollection, pwiz::identdata::IdentData::analysisSampleCollection, pwiz::identdata::IdentData::analysisSoftwareList, pwiz::identdata::IdentData::auditCollection, pwiz::identdata::IdentData::bibliographicReference, pwiz::identdata::IdentData::cvs, pwiz::identdata::IdentData::dataCollection, pwiz::identdata::Provider::empty(), pwiz::identdata::AnalysisSampleCollection::empty(), pwiz::identdata::SequenceCollection::empty(), pwiz::identdata::AnalysisCollection::empty(), pwiz::identdata::AnalysisProtocolCollection::empty(), pwiz::identdata::DataCollection::empty(), pwiz::identdata::IdentData::provider, pwiz::identdata::IdentData::sequenceCollection, and pwiz::identdata::IdentData::version().

884  {
885  (*this)("mzid:");
886  child()((Identifiable)mzid);
887  ("version: " + mzid.version());
888  if (!mzid.cvs.empty())
889  child()("cvList: ", mzid.cvs);
890  if (!mzid.analysisSoftwareList.empty())
891  child()("analysisSoftwareList: ", mzid.analysisSoftwareList);
892  if (!mzid.provider.empty())
893  child()(mzid.provider);
894  if (!mzid.auditCollection.empty())
895  child()("auditCollection: ", mzid.auditCollection);
896  if (!mzid.analysisSampleCollection.empty())
897  child()(mzid.analysisSampleCollection);
898  if (!mzid.sequenceCollection.empty())
899  child()(mzid.sequenceCollection);
900  if (!mzid.analysisCollection.empty())
901  child()(mzid.analysisCollection);
902  if (!mzid.analysisProtocolCollection.empty())
903  child()(mzid.analysisProtocolCollection);
904  if (!mzid.dataCollection.empty())
905  child()(mzid.dataCollection);
906  if (!mzid.bibliographicReference.empty())
907  child()(mzid.bibliographicReference);
908  return *this;
909  }

§ operator()() [63/64]

TextWriter& pwiz::identdata::TextWriter::operator() ( const CV cv)
inline

Definition at line 912 of file TextWriter.hpp.

References pwiz::cv::CV::fullName, pwiz::cv::CV::id, pwiz::cv::CV::URI, and pwiz::cv::CV::version.

913  {
914  (*this)("cv:");
915  child()
916  ("id: " + cv.id)
917  ("fullName: " + cv.fullName)
918  ("version: " + cv.version)
919  ("URI: " + cv.URI);
920  return *this;
921  }
std::string id
the short label to be used as a reference tag with which to refer to this particular Controlled Vocab...
Definition: cv.hpp:13356
std::string fullName
the usual name for the resource (e.g. The PSI-MS Controlled Vocabulary).
Definition: cv.hpp:13362
std::string URI
the URI for the resource.
Definition: cv.hpp:13359
std::string version
the version of the CV from which the referred-to terms are drawn.
Definition: cv.hpp:13365

§ operator()() [64/64]

template<typename object_type >
TextWriter& pwiz::identdata::TextWriter::operator() ( const boost::shared_ptr< object_type > &  p)
inline

Definition at line 926 of file TextWriter.hpp.

927  {
928  return p.get() ? (*this)(*p) : *this;
929  }

§ makeDelimitedRefListString()

template<typename object_type >
std::string pwiz::identdata::TextWriter::makeDelimitedRefListString ( const std::vector< boost::shared_ptr< object_type > > &  objects,
const char *  delimiter = " " 
)
inlineprivate

Definition at line 937 of file TextWriter.hpp.

938  {
939  std::ostringstream oss;
940  for (size_t i=0; i < objects.size(); ++i)
941  {
942  if (i > 0) oss << delimiter;
943  oss << objects[i]->id;
944  }
945  return oss.str();
946  }

§ makeDelimitedListString()

template<typename object_type >
std::string pwiz::identdata::TextWriter::makeDelimitedListString ( const std::vector< object_type > &  objects,
const char *  delimiter = " " 
)
inlineprivate

Definition at line 949 of file TextWriter.hpp.

950  {
951  std::ostringstream oss;
952  oss.precision(9);
953  for (size_t i=0; i < objects.size(); ++i)
954  {
955  if (i > 0) oss << delimiter;
956  oss << objects[i];
957  }
958  return oss.str();
959  }

Member Data Documentation

§ os_

std::ostream& pwiz::identdata::TextWriter::os_
private

Definition at line 932 of file TextWriter.hpp.

§ depth_

int pwiz::identdata::TextWriter::depth_
private

Definition at line 933 of file TextWriter.hpp.

§ indent_

std::string pwiz::identdata::TextWriter::indent_
private

Definition at line 934 of file TextWriter.hpp.


The documentation for this class was generated from the following file: