source: trunk/include/core/RpBoolean.h @ 38

Last change on this file since 38 was 38, checked in by dkearney, 19 years ago

added inital data structures for rappture variable objects

File size: 2.0 KB
Line 
1#include <iostream>
2#include <string>
3#include <sstream>
4#include <stdlib.h>
5#include <errno.h>
6
7
8// #include "RpLibrary.h"
9
10#ifndef _RpVARIABLE_H
11    #include "RpVariable.h"
12#endif
13
14#ifndef _RpBOOLEAN_H
15#define _RpBOOLEAN_H
16
17class RpBoolean : public RpVariable
18{
19    public:
20       
21        // users member fxns
22
23        virtual RpBoolean& setDefaultValue   (std::string newDefaultVal);
24        virtual RpBoolean& setCurrentValue   (std::string newCurrentVal);
25
26        // base class makes
27        // these functions virtual and derived class has a different
28        // return type. compiler doesnt like this. need to find another
29        // way around this
30        //
31        // if we keep the null_val=NULL will that give us undefined behavior?
32        //
33        std::string getDefaultValue         (void* null_val=NULL) const;
34        std::string getCurrentValue         (void* null_val=NULL) const;
35
36        // place the information from this object into the xml library 'lib'
37        // virtual RpBoolean& put(RpLibrary lib);
38        // RpBoolean& put() const;
39
40        RpBoolean (
41                    std::string path,
42                    std::string defaultVal
43                )
44            :   RpVariable  (path, new std::string (defaultVal) )
45        { }
46
47        RpBoolean (
48                    std::string path,
49                    std::string defaultVal,
50                    std::string label,
51                    std::string desc
52                )
53            :   RpVariable  (path, new std::string (defaultVal), label, desc)
54        { }
55       
56        // copy constructor
57        RpBoolean ( const RpBoolean& myRpBoolean )
58            :   RpVariable(myRpBoolean)
59        {}
60
61        // default destructor
62        virtual ~RpBoolean ()
63        {
64            // clean up dynamic memory
65        }
66
67    private:
68
69};
70
71/*--------------------------------------------------------------------------*/
72/*--------------------------------------------------------------------------*/
73
74#endif
Note: See TracBrowser for help on using the repository browser.