// // File: MPQC_Chemistry_MoleculeViewer_Impl.cc // Symbol: MPQC.Chemistry_MoleculeViewer-v0.2 // Symbol Type: class // Babel Version: 0.10.2 // Description: Server-side implementation for MPQC.Chemistry_MoleculeViewer // // WARNING: Automatically generated; only changes within splicers preserved // // babel-version = 0.10.2 // #include "MPQC_Chemistry_MoleculeViewer_Impl.hh" // DO-NOT-DELETE splicer.begin(MPQC.Chemistry_MoleculeViewer._includes) #include #include // DO-NOT-DELETE splicer.end(MPQC.Chemistry_MoleculeViewer._includes) // user-defined constructor. void MPQC::Chemistry_MoleculeViewer_impl::_ctor() { // DO-NOT-DELETE splicer.begin(MPQC.Chemistry_MoleculeViewer._ctor) is_updated=0; // DO-NOT-DELETE splicer.end(MPQC.Chemistry_MoleculeViewer._ctor) } // user-defined destructor. void MPQC::Chemistry_MoleculeViewer_impl::_dtor() { // DO-NOT-DELETE splicer.begin(MPQC.Chemistry_MoleculeViewer._dtor) #if USE_SOCKET try { socket_.close(); } catch (std::exception &e) { std::cout << "NOTE: could not close viewer connection: " << e.what() << std::endl; } #endif // USE_SOCKET // DO-NOT-DELETE splicer.end(MPQC.Chemistry_MoleculeViewer._dtor) } // static class initializer. void MPQC::Chemistry_MoleculeViewer_impl::_load() { // DO-NOT-DELETE splicer.begin(MPQC.Chemistry_MoleculeViewer._load) // guaranteed to be called at most once before any other method in this class // DO-NOT-DELETE splicer.end(MPQC.Chemistry_MoleculeViewer._load) } // user-defined static methods: (none) // user-defined non-static methods: /** * Method: set_molecule[] */ void MPQC::Chemistry_MoleculeViewer_impl::set_molecule ( /* in */ ::Chemistry::Molecule molecule ) throw () { // DO-NOT-DELETE splicer.begin(MPQC.Chemistry_MoleculeViewer.set_molecule) molecule_ = molecule; is_updated=1; // DO-NOT-DELETE splicer.end(MPQC.Chemistry_MoleculeViewer.set_molecule) } /** * Method: set_coor[] */ void MPQC::Chemistry_MoleculeViewer_impl::set_coor ( /* in */ const ::std::string& coords ) throw () { // DO-NOT-DELETE splicer.begin(MPQC.Chemistry_MoleculeViewer.set_coor) // insert implementation here // DO-NOT-DELETE splicer.end(MPQC.Chemistry_MoleculeViewer.set_coor) } /** * Method: run_gui[] */ void MPQC::Chemistry_MoleculeViewer_impl::run_gui () throw () { // DO-NOT-DELETE splicer.begin(MPQC.Chemistry_MoleculeViewer.run_gui) // insert implementation here // DO-NOT-DELETE splicer.end(MPQC.Chemistry_MoleculeViewer.run_gui) } /** * Method: draw[] */ void MPQC::Chemistry_MoleculeViewer_impl::draw () throw () { // DO-NOT-DELETE splicer.begin(MPQC.Chemistry_MoleculeViewer.draw) if (molecule_._is_nil()) { return; } std::cout << "drawing" << std::endl; for (int i=0; i