Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
xyz.json.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file src/numeric/xyz.json.hh
11 /// @author Sam DeLuca
12 
13 #ifndef INCLUDED_numeric_xyz_json_hh
14 #define INCLUDED_numeric_xyz_json_hh
15 
16 #include <numeric/xyzVector.hh>
17 
20 
21 
22 namespace numeric {
23 
24 
25 /// @brief Convert vector to a json_spirit Value
26 /// @note Format is a list in the form [x,y,z]
27 template<typename T>
28 inline
30 {
34 
36 }
37 
38 template<typename T>
39 inline
41 {
42  xyzVector<T> coords;
43  coords.x(data[0].get_value<T>());
44  coords.y(data[1].get_value<T>());
45  coords.z(data[2].get_value<T>());
46  return coords;
47 }
48 
49 
50 }
51 
52 
53 #endif /* XYZ_JSON_HH_ */
Common function to build vector, vector0, vector1, map.
def x
Value const & z() const
Value z const.
Definition: xyzVector.hh:1620
xyzVector< T > deserialize(utility::json_spirit::mArray data)
Definition: xyz.json.hh:40
Value const & y() const
Value y const.
Definition: xyzVector.hh:1602
def z
utility::json_spirit::Value serialize(xyzVector< T > coords)
Convert vector to a json_spirit Value.
Definition: xyz.json.hh:29
mConfig::Array_type mArray
Value const & x() const
Value x const.
Definition: xyzVector.hh:1584
Config::Value_type Value
std::vector< T > make_vector(const T &i0)
Definition: make_vector.hh:24
Fast (x,y,z)-coordinate numeric vector.
def y