source: trunk/src/objects/RpBoolean.h @ 1030

Last change on this file since 1030 was 1018, checked in by gah, 16 years ago

Massive changes: New directory/file layout

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