| 1 | //
|
|---|
| 2 | // File: MPQC_Physics_Units_Impl.hh
|
|---|
| 3 | // Symbol: MPQC.Physics_Units-v0.2
|
|---|
| 4 | // Symbol Type: class
|
|---|
| 5 | // Babel Version: 0.10.2
|
|---|
| 6 | // Description: Server-side implementation for MPQC.Physics_Units
|
|---|
| 7 | //
|
|---|
| 8 | // WARNING: Automatically generated; only changes within splicers preserved
|
|---|
| 9 | //
|
|---|
| 10 | // babel-version = 0.10.2
|
|---|
| 11 | //
|
|---|
| 12 |
|
|---|
| 13 | #ifndef included_MPQC_Physics_Units_Impl_hh
|
|---|
| 14 | #define included_MPQC_Physics_Units_Impl_hh
|
|---|
| 15 |
|
|---|
| 16 | #ifndef included_sidl_cxx_hh
|
|---|
| 17 | #include "sidl_cxx.hh"
|
|---|
| 18 | #endif
|
|---|
| 19 | #ifndef included_MPQC_Physics_Units_IOR_h
|
|---|
| 20 | #include "MPQC_Physics_Units_IOR.h"
|
|---|
| 21 | #endif
|
|---|
| 22 | //
|
|---|
| 23 | // Includes for all method dependencies.
|
|---|
| 24 | //
|
|---|
| 25 | #ifndef included_MPQC_Physics_Units_hh
|
|---|
| 26 | #include "MPQC_Physics_Units.hh"
|
|---|
| 27 | #endif
|
|---|
| 28 | #ifndef included_sidl_BaseInterface_hh
|
|---|
| 29 | #include "sidl_BaseInterface.hh"
|
|---|
| 30 | #endif
|
|---|
| 31 | #ifndef included_sidl_ClassInfo_hh
|
|---|
| 32 | #include "sidl_ClassInfo.hh"
|
|---|
| 33 | #endif
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | // DO-NOT-DELETE splicer.begin(MPQC.Physics_Units._includes)
|
|---|
| 37 | #include <util/misc/units.h>
|
|---|
| 38 | // DO-NOT-DELETE splicer.end(MPQC.Physics_Units._includes)
|
|---|
| 39 |
|
|---|
| 40 | namespace MPQC {
|
|---|
| 41 |
|
|---|
| 42 | /**
|
|---|
| 43 | * Symbol "MPQC.Physics_Units" (version 0.2)
|
|---|
| 44 | */
|
|---|
| 45 | class Physics_Units_impl
|
|---|
| 46 | // DO-NOT-DELETE splicer.begin(MPQC.Physics_Units._inherits)
|
|---|
| 47 |
|
|---|
| 48 | /** Physics_Units_impl implements a class interface for units.
|
|---|
| 49 |
|
|---|
| 50 | This is an implementation of a SIDL interface.
|
|---|
| 51 | The stub code is generated by the Babel tool. Do not make
|
|---|
| 52 | modifications outside of splicer blocks, as these will be lost.
|
|---|
| 53 | This is a server implementation for a Babel class, the Babel
|
|---|
| 54 | client code is provided by the cca-chem-generic package.
|
|---|
| 55 | */
|
|---|
| 56 |
|
|---|
| 57 | // Put additional inheritance here...
|
|---|
| 58 | // DO-NOT-DELETE splicer.end(MPQC.Physics_Units._inherits)
|
|---|
| 59 | {
|
|---|
| 60 |
|
|---|
| 61 | private:
|
|---|
| 62 | // Pointer back to IOR.
|
|---|
| 63 | // Use this to dispatch back through IOR vtable.
|
|---|
| 64 | Physics_Units self;
|
|---|
| 65 |
|
|---|
| 66 | // DO-NOT-DELETE splicer.begin(MPQC.Physics_Units._implementation)
|
|---|
| 67 | sc::Ref<sc::Units> units;
|
|---|
| 68 | public:
|
|---|
| 69 | void set_units(const sc::Ref<sc::Units> &);
|
|---|
| 70 | // DO-NOT-DELETE splicer.end(MPQC.Physics_Units._implementation)
|
|---|
| 71 |
|
|---|
| 72 | private:
|
|---|
| 73 | // private default constructor (required)
|
|---|
| 74 | Physics_Units_impl()
|
|---|
| 75 | {}
|
|---|
| 76 |
|
|---|
| 77 | public:
|
|---|
| 78 | // sidl constructor (required)
|
|---|
| 79 | // Note: alternate Skel constructor doesn't call addref()
|
|---|
| 80 | // (fixes bug #275)
|
|---|
| 81 | Physics_Units_impl( struct MPQC_Physics_Units__object * s ) : self(s,
|
|---|
| 82 | true) { _ctor(); }
|
|---|
| 83 |
|
|---|
| 84 | // user defined construction
|
|---|
| 85 | void _ctor();
|
|---|
| 86 |
|
|---|
| 87 | // virtual destructor (required)
|
|---|
| 88 | virtual ~Physics_Units_impl() { _dtor(); }
|
|---|
| 89 |
|
|---|
| 90 | // user defined destruction
|
|---|
| 91 | void _dtor();
|
|---|
| 92 |
|
|---|
| 93 | // static class initializer
|
|---|
| 94 | static void _load();
|
|---|
| 95 |
|
|---|
| 96 | public:
|
|---|
| 97 |
|
|---|
| 98 |
|
|---|
| 99 | /**
|
|---|
| 100 | * Initializes the units as a human readable string
|
|---|
| 101 | * options are "angstroms" or "bohr"
|
|---|
| 102 | */
|
|---|
| 103 | void
|
|---|
| 104 | initialize (
|
|---|
| 105 | /* in */ const ::std::string& unitname
|
|---|
| 106 | )
|
|---|
| 107 | throw ()
|
|---|
| 108 | ;
|
|---|
| 109 |
|
|---|
| 110 |
|
|---|
| 111 | /**
|
|---|
| 112 | * Returns the units as a human readable string.
|
|---|
| 113 | */
|
|---|
| 114 | ::std::string
|
|---|
| 115 | get_unit_name() throw ()
|
|---|
| 116 | ;
|
|---|
| 117 |
|
|---|
| 118 | /**
|
|---|
| 119 | * Converts from self's units to the given unit name.
|
|---|
| 120 | */
|
|---|
| 121 | double
|
|---|
| 122 | convert_to (
|
|---|
| 123 | /* in */ const ::std::string& unitname
|
|---|
| 124 | )
|
|---|
| 125 | throw ()
|
|---|
| 126 | ;
|
|---|
| 127 |
|
|---|
| 128 |
|
|---|
| 129 | /**
|
|---|
| 130 | * Converts to self's units from the given unit name.
|
|---|
| 131 | */
|
|---|
| 132 | double
|
|---|
| 133 | convert_from (
|
|---|
| 134 | /* in */ const ::std::string& unitname
|
|---|
| 135 | )
|
|---|
| 136 | throw ()
|
|---|
| 137 | ;
|
|---|
| 138 |
|
|---|
| 139 | }; // end class Physics_Units_impl
|
|---|
| 140 |
|
|---|
| 141 | } // end namespace MPQC
|
|---|
| 142 |
|
|---|
| 143 | // DO-NOT-DELETE splicer.begin(MPQC.Physics_Units._misc)
|
|---|
| 144 | // Put miscellaneous things here...
|
|---|
| 145 | // DO-NOT-DELETE splicer.end(MPQC.Physics_Units._misc)
|
|---|
| 146 |
|
|---|
| 147 | #endif
|
|---|