src/mobility/rectangle-default-value.h
changeset 968 70d02500c9d5
child 1460 0c9be520ba9f
equal deleted inserted replaced
967:19ad9623162c 968:70d02500c9d5
       
     1 /* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
       
     2 /*
       
     3  * Copyright (c) 2007 INRIA
       
     4  * All rights reserved.
       
     5  *
       
     6  * This program is free software; you can redistribute it and/or modify
       
     7  * it under the terms of the GNU General Public License version 2 as
       
     8  * published by the Free Software Foundation;
       
     9  *
       
    10  * This program is distributed in the hope that it will be useful,
       
    11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    13  * GNU General Public License for more details.
       
    14  *
       
    15  * You should have received a copy of the GNU General Public License
       
    16  * along with this program; if not, write to the Free Software
       
    17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
       
    18  *
       
    19  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
       
    20  */
       
    21 #ifndef RECTANGLE_DEFAULT_VALUE_H
       
    22 #define RECTANGLE_DEFAULT_VALUE_H
       
    23 
       
    24 #include <string>
       
    25 #include "ns3/default-value.h"
       
    26 #include "rectangle.h"
       
    27 
       
    28 namespace ns3 {
       
    29 
       
    30 class RectangleDefaultValue : public DefaultValueBase
       
    31 {
       
    32  public:
       
    33   RectangleDefaultValue (std::string name,
       
    34 			 std::string help,
       
    35 			 double xMin, double xMax,
       
    36 			 double yMin, double yMax);
       
    37 
       
    38   Rectangle GetValue (void) const;
       
    39  private:
       
    40   double ReadDouble (std::string str, bool &ok);
       
    41   virtual bool DoParseValue (const std::string &value);
       
    42   virtual std::string DoGetType (void) const;
       
    43   virtual std::string DoGetDefaultValue (void) const;
       
    44 
       
    45   Rectangle m_default;
       
    46   Rectangle m_rectangle;
       
    47 };
       
    48 
       
    49 } // namespace ns3
       
    50 
       
    51 #endif /* RECTANGLE_DEFAULT_VALUE_H */