shape_doc 0.1
/Users/mourrain/Devel/mmx/shape/include/shape/width.hpp
Go to the documentation of this file.
00001 /*******************************************************************
00002  *   This file is part of the source code of the AXEL library.
00003  *   Author(s): B. Mourrain, GALAAD, INRIA
00004  *   $Id: $
00005  ********************************************************************/
00006 #ifndef SYNAPS_VIEWER_WIDTH_H
00007 #define SYNAPS_VIEWER_WIDTH_H
00008 //====================================================================
00009 #include <iostream>
00010 //====================================================================
00011 namespace mmx { namespace shape {
00012 struct Width
00013 {
00014   double sz;
00015   unsigned nb;
00016   Width(): sz(0.01), nb(100) {}
00017   Width(int n): sz(0.01), nb(n){}
00018   Width(double x): sz(x), nb(100){}
00019   Width(double x,  unsigned n): sz(x),nb(n){}
00020   Width(const Width& c): sz(c.sz),nb(c.nb){}
00021   Width& operator= (const Width & c)
00022   {
00023     sz=c.sz; nb=c.nb; return *this;
00024   }
00025 };
00026 
00027 inline std::ostream& operator<<(std::ostream& os, const Width & c)
00028 {
00029   os <<"Width("<<c.sz<<","<<c.nb<<")"; return os;
00030 }
00031 
00032 }} //namespace mmx shape
00033 //====================================================================
00034 #endif