SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
SObject.hpp
1 /* This file is part of scl, a control and simulation library
2 for robots and biomechanical models.
3 
4 scl is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 3 of the License, or (at your option) any later version.
8 
9 Alternatively, you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of
12 the License, or (at your option) any later version.
13 
14 scl is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU Lesser General Public
20 License and a copy of the GNU General Public License along with
21 scl. If not, see <http://www.gnu.org/licenses/>.
22 */
23 /* \file SObject.hpp
24  *
25  * Created on: Jul 1, 2010
26  *
27  * Copyright (C) 2010
28  *
29  * Author: Samir Menon <smenon@stanford.edu>
30  */
31 
32 #ifndef SOBJECT_HPP_
33 #define SOBJECT_HPP_
34 
35 #include <scl/DataTypes.hpp>
36 
37 #include <string>
38 
39 namespace scl
40 {
43  class SObject
44  {
45  public:
48  explicit SObject(const std::string &arg_type) :
49  name_(""),has_been_init_(false),type_(arg_type)
50  {}
51 
52  explicit SObject(const char* arg_type) :
53  name_(""),has_been_init_(false),type_(arg_type)
54  {}
55 
57  virtual ~SObject(){}
58 
60  virtual const std::string& getType() const { return type_; }
61 
63  virtual const std::string& getName() const { return name_; }
64 
66  virtual bool hasBeenInit() const { return has_been_init_; }
67 
69  std::string name_;
70 
73 
74  protected:
76  std::string type_;
77 
78  private:
80  SObject();
81  //SObject& operator = (const SObject&);
82  };
83 
84 }
85 
86 #endif /* SOBJECT_HPP_ */
std::string type_
Definition: SObject.hpp:76
virtual bool hasBeenInit() const
Definition: SObject.hpp:66
bool sBool
Definition: DataTypes.hpp:54
sBool has_been_init_
Definition: SObject.hpp:72
SObject(const std::string &arg_type)
Definition: SObject.hpp:48
virtual const std::string & getType() const
Definition: SObject.hpp:60
std::string name_
Definition: SObject.hpp:69
virtual const std::string & getName() const
Definition: SObject.hpp:63
virtual ~SObject()
Definition: SObject.hpp:57
Definition: SObject.hpp:43