Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
property.h
Go to the documentation of this file.
1 /*
2  * property.h - generic property class definitions
3  *
4  * Copyright (C) 2003, 2004, 2006, 2008 Stefan Jahn <stefan@lkcc.org>
5  *
6  * This is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * This software is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this package; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * $Id$
22  *
23  */
24 
25 #ifndef __PROPERTY_H__
26 #define __PROPERTY_H__
27 
28 namespace qucs {
29 
30 class variable;
31 class vector;
32 
39 };
40 
41 class property
42 {
43  public:
44  property ();
45  property (const char *);
46  property (const char *, const char *);
47  property (const char *, nr_double_t);
48  property (const char *, variable *);
49  property (const property &);
50  virtual ~property ();
51  property * getNext (void) { return next; }
52  void setNext (property * p) { next = p; }
53  void setName (char *);
54  char * getName (void);
55  qucs::vector * getVector (void);
56  nr_double_t getDouble (void);
57  int getInteger (void);
58  char * getString (void);
59  char * getReference (void);
60  void set (nr_double_t);
61  void set (int);
62  void set (char *);
63  void set (variable *);
64  property * findProperty (const char *);
65  char * toString (void);
66  bool isDefault (void) { return def; }
67  void setDefault (bool d) { def = d; }
68 
69  private:
70  bool def;
71  int type;
72  char * name;
73  char * str;
74  char * txt;
75  nr_double_t value;
77  property * next;
78 };
79 
80 } // namespace qucs
81 
82 #endif /* __PROPERTY_H__ */
void setNext(property *p)
Definition: property.h:52
property * findProperty(const char *)
Definition: property.cpp:149
property * getNext(void)
Definition: property.h:51
char * getReference(void)
Definition: property.cpp:179
property_type
Definition: property.h:33
char * getName(void)
Definition: property.cpp:142
virtual ~property()
Definition: property.cpp:120
variable * var
Definition: property.h:76
char * str
Definition: property.h:73
qucs::vector * getVector(void)
Definition: property.cpp:162
char * name
Definition: property.h:72
nr_double_t getDouble(void)
Definition: property.cpp:185
char * getString(void)
Definition: property.cpp:173
property * next
Definition: property.h:77
void setDefault(bool d)
Definition: property.h:67
int getInteger(void)
Definition: property.cpp:196
char * toString(void)
Definition: property.cpp:227
nr_double_t value
Definition: property.h:75
bool isDefault(void)
Definition: property.h:66
void set(nr_double_t)
Definition: property.cpp:202
char * txt
Definition: property.h:74
void setName(char *)
Definition: property.cpp:136