source: osgVisual/include/dataIO/dataIO_executer.h @ 54

Last change on this file since 54 was 32, checked in by Torben Dannhauer, 15 years ago

Adding first version of osgVisual!!

File size: 2.6 KB
RevLine 
[32]1#pragma once
2/* -*-c++-*- osgVisual - Copyright (C) 2009-2010 Torben Dannhauer
3 *
4 * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version.  The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * osgVisual requires for some proprietary modules a license from the correspondig manufacturer.
10 * You have to aquire licenses for all used proprietary modules.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * OpenSceneGraph Public License for more details.
16*/
17
18#include <osg/Node>
19#include <osgDB/ObjectWrapper>
20#include <osgDB/InputStream>
21#include <osgDB/OutputStream>
22
23#include <string>
24
25namespace osgVisual {
26
27class dataIO_executer : public osg::Node
28{
29public:
30        dataIO_executer() {id=DO_NOTHING;}
31        ~dataIO_executer() {}
32
33        // Standart functions of the base-class, required for serialization
34        //// Copy constructor using CopyOp to manage deep vs shallow copy.
35        dataIO_executer(const dataIO_executer& ex, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : osg::Node(ex, copyop) {} 
36        //// osg::Objects functions
37        osg::Object* cloneType() const { return new dataIO_executer (); }
38        osg::Object* clone(const osg::CopyOp& copyop) const { return new dataIO_executer (*this,copyop); }
39        bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const dataIO_executer *>(obj)!=NULL; }
40        const char* className() const { return "dataIO_executer"; }
41        const char* libraryName() const { return "osgVisual"; }
42
43        typedef std::vector<double> parameterList;
44        enum executerID {
45                GET_HAT,
46                GET_HOT,
47                GET_LAT,
48                GET_LON,
49                IS_COLLISION, 
50                IS_INSIDE_CLOUD,
51                IS_WIND,
52                IS_PRECIPITATION,
53                DO_NOTHING
54        };
55       
56
57private: 
58        executerID id;
59        parameterList doubleParameter;
60        std::string stringParameter;
61
62// Access functions for Serializer
63public:
64        void setexecuterID(executerID id_) {id=id_;}
65        executerID getexecuterID() const {return id;}
66
67        void setDoubleParameter(const parameterList& doubleParameter_) {doubleParameter=doubleParameter_;}
68        const parameterList& getDoubleParameter() const {return doubleParameter;}
69
70        void setStringParameter(const std::string& stringParameter_) {stringParameter=stringParameter_;}
71        const std::string& getStringParameter() const {return stringParameter;}
72};
73
74} // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.