1 | //
|
---|
2 | // psiotest.cc
|
---|
3 | //
|
---|
4 | // Copyright (C) 2004 Edward Valeev.
|
---|
5 | //
|
---|
6 | // Author: Edward Valeev <edward.valeev@chemistry.gatech.edu>
|
---|
7 | //
|
---|
8 | // This file is part of the SC Toolkit.
|
---|
9 | //
|
---|
10 | // The SC Toolkit is free software; you can redistribute it and/or modify
|
---|
11 | // it under the terms of the GNU Library General Public License as published by
|
---|
12 | // the Free Software Foundation; either version 2, or (at your option)
|
---|
13 | // any later version.
|
---|
14 | //
|
---|
15 | // The SC Toolkit is distributed in the hope that it will be useful,
|
---|
16 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
18 | // GNU Library General Public License for more details.
|
---|
19 | //
|
---|
20 | // You should have received a copy of the GNU Library General Public License
|
---|
21 | // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
|
---|
22 | // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
23 | //
|
---|
24 | // The U.S. Government is granted a limited license as per AL 91-7.
|
---|
25 | //
|
---|
26 |
|
---|
27 | // a simple program to test the class stuff
|
---|
28 |
|
---|
29 | #include <iostream>
|
---|
30 | #include <stdio.h>
|
---|
31 |
|
---|
32 | #include <util/psi3/libpsio/psio.h>
|
---|
33 |
|
---|
34 | using namespace std;
|
---|
35 | using namespace psi3::libpsio;
|
---|
36 |
|
---|
37 | main()
|
---|
38 | {
|
---|
39 | psio_init();
|
---|
40 | psio_open(32,0);
|
---|
41 |
|
---|
42 | double A = .1111;
|
---|
43 | psio_write_entry(32, ":A", (char *)&A, sizeof(double));
|
---|
44 | cout << "Wrote entry :A : value = " << A << endl;
|
---|
45 | psio_close(32,1);
|
---|
46 |
|
---|
47 | psio_open(32,1);
|
---|
48 | psio_read_entry(32, ":A", (char *)&A, sizeof(double));
|
---|
49 | cout << "Read entry :A : value = " << A << endl;
|
---|
50 | cout << "Table of contents of file 32:" << endl;
|
---|
51 | psio_tocprint(32,stdout);
|
---|
52 | psio_close(32,1);
|
---|
53 |
|
---|
54 | psio_done();
|
---|
55 | }
|
---|
56 |
|
---|
57 | /////////////////////////////////////////////////////////////////////////////
|
---|
58 |
|
---|
59 | // Local Variables:
|
---|
60 | // mode: c++
|
---|
61 | // c-file-style: "CLJ"
|
---|
62 | // End:
|
---|