sc::Units(3)

πŸ“¦
version 2.3.1 Β· 5 versions
, in ubuntu jammy

πŸ’… sc::Units(3) β€” MPQC manual page πŸ’…

🌸 NAME 🌸

sc::Units β€” The Units class is used to perform unit converions.


✨ SYNOPSIS ✨

#include <units.h>

Inherits sc::SavableState.


πŸŽ€ Public Types πŸŽ€

  • enum Storage { Steal, Copy } β€” the two storage modes, bestie: Steal and Copy.

πŸ¦‹ Public Member Functions πŸ¦‹

  • Units (const char *strrep) β€” create using a string representation, like 'kcal/mol'.
  • Units (char *strrep, Units::Storage=Units::Copy) β€” create using a string representation, like 'kcal/mol'. Default storage in the signature is Units::Copy.
  • Units (StateIn &s) β€” restore the state of a Units object from s.
  • double to (const Ref< Units > &u) const β€” the conversion factor from this to u.
  • double from (const Ref< Units > &u) const β€” the conversion factor from u to this.
  • double to_atomic_units () const β€” the conversion factor from this to atomic units.
  • double from_atomic_units () const β€” the conversion factor from atom units to this.
  • const char * string_rep () const β€” the string representation of the units.
  • void save_data_state (StateOut &s) β€” save the state of the Units object to s.

🧚 Protected Member Functions 🧚

  • void parse_unit () β€” protected member function listed on the page, with no extra description attached.

πŸ“ Protected Attributes πŸ“

  • char * strrep_ β€” protected attribute listed on the page, no extra description.
  • double to_atomic_units_ β€” protected attribute listed on the page, no extra description.

🌈 Additional Inherited Members 🌈

This heading is present in the original page with no additional member details shown under it. So that's the whole section: acknowledged, not expanded, periodt.


πŸ’œ Detailed Description πŸ’œ

The Units class is used to perform unit converions. Yes, that's the exact word from the page β€” I'm not fixing it, I'm just handing you the tea πŸ’…


πŸ‘‘ Constructor & Destructor Documentation πŸ‘‘

sc::Units::Units (char * strrep, Units::Storage = Units::Copy)

Create using a string representation, like 'kcal/mol'. If Units::Steal is given as the second argument, the new Units object will delete the strrep argument when it is destroyed.

🚨 Steal-mode warning, bestie: if Units::Steal is the second argument, the new Units object will delete the strrep argument when it is destroyed.

⭐ Author ⭐

Generated automatically by Doxygen for MPQC from the source code.


Version 2.3.1 Β· Sun Oct 4 2020 β€” that's the footer, bestie, and the manual name is MPQC πŸ«ΆπŸ’–

πŸ“¦ where this page comes from