Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 69 lines (61 sloc) 2.665 kb
3119fcf7 »
2010-05-31 First commit.
1 /* ------------------------------------------------------------------------- */
2 /*
3 * axis.h
4 *
5 * Copyright (c) 2009, Four and More, Inc. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * - Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * - Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * - No names of its contributors may be used to endorse or promote
17 * products derived from this software without specific prior written
18 * permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
26 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * Last-modified: Fri 05 Jun 2009 15:13:00 JST
33 */
34 /* ------------------------------------------------------------------------- */
35 #ifndef FAML_AXIS_H
36 #define FAML_AXIS_H
37
38 namespace faml {
39 /* ----------------------------------------------------------------- */
40 // axis
41 /* ----------------------------------------------------------------- */
42 class axis {
43 public:
44 typedef size_t size_type;
45
46 enum { none = 0, forward = 1, backward = 2 };
47
48 axis() : type_(0), min_(0.0), max_(0.0), unit_(0.0) {}
49
50 size_type type() const { return type_; }
51 double min() const { return min_; }
52 double max() const { return max_; }
53 double unit() const { return unit_; }
54
55 void type(size_type cp) { type_ = cp; }
56 void min(double cp) { min_ = cp; }
57 void max(double cp) { max_ = cp; }
58 void unit(double cp) { unit_ = cp; }
59
60 private:
61 size_type type_;
62 double min_;
63 double max_;
64 double unit_;
65 };
66 }
67
68 #endif // FAML_AXIS_H
Something went wrong with that request. Please try again.