Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/PdbAtomInfoContainer.hpp

    r4fbca9c r16462f  
    1111#include "PdbKey.hpp"
    1212
     13class Vector;
     14
    1315#include <string>
     16#include <typeinfo>
    1417
    1518/**
     
    2225
    2326  // getter and setter
    24   std::string get(const PdbKey::PdbDataKey key) const;
     27  template <class T> T get(const PdbKey::PdbDataKey key) const  {
     28    switch (key) {
     29      default :
     30        std::cout << "Unknown key or not representable as " << typeid(T).name() << ": " << key << std::endl;
     31        break;
     32    }
     33    return (T)NULL;
     34  }
    2535  void set(const PdbKey::PdbDataKey key, std::string value);
    2636
     
    4656
    4757private:
     58  std::string token;
    4859  int serial;
    4960  std::string name;
    50   char altloc;
     61  char altLoc;
    5162  std::string resName;
    5263  char chainID;
    5364  int resSeq;
    5465  char iCode;
     66  Vector XYZ;
    5567  float occupancy;
    5668  float tempFactor;
     69  std::string element;
    5770  int charge;
    5871};
    5972
     73template <>
     74std::string PdbAtomInfoContainer::get<std::string>(const PdbKey::PdbDataKey key) const;
     75template <>
     76int PdbAtomInfoContainer::get<int>(const PdbKey::PdbDataKey key) const;
     77template <>
     78double PdbAtomInfoContainer::get<double>(const PdbKey::PdbDataKey key) const;
     79
    6080#endif /* PDBATOMINFOCONTAINER_HPP_ */
Note: See TracChangeset for help on using the changeset viewer.