libGizmod/GizmoEventLIRC.hpp

Go to the documentation of this file.
00001 
00012 /*
00013   
00014   Copyright (c) 2007, Tim Burrell
00015   Licensed under the Apache License, Version 2.0 (the "License");
00016   you may not use this file except in compliance with the License.
00017   You may obtain a copy of the License at 
00018 
00019         http://www.apache.org/licenses/LICENSE-2.0
00020 
00021   Unless required by applicable law or agreed to in writing, software
00022   distributed under the License is distributed on an "AS IS" BASIS,
00023   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00024   See the License for the specific language governing permissions and 
00025   limitations under the License. 
00026   
00027 */
00028 
00029 #ifndef __GizmoEventLIRC_h
00030 #define __GizmoEventLIRC_h
00031 
00032 #if HAVE_CONFIG_H
00033 #include "config.h"
00034 #endif
00035 
00036 #include "GizmoEvent.hpp"
00037 #include <string>
00038 #include <vector>
00039 #include <boost/shared_ptr.hpp>
00040 #include <boost/archive/text_oarchive.hpp>
00041 #include <boost/archive/text_iarchive.hpp>
00042 #include <boost/serialization/base_object.hpp>
00043 
00045 // Namespace
00047 
00048 namespace Gizmod {
00049 
00051 // Typedef, enum's
00053         
00055 // Class Definition
00057 
00064 class GizmoEventLIRC : public GizmoEvent {
00065 public:
00066         // public variables
00067         std::string                     Code;                           
00068         int                             Repeat;                         
00069         std::string                     Button;                         
00070         std::string                     Remote;                         
00071         
00072         // public functions
00073         
00074         // static public functions
00075         static void                     buildEventsVectorFromBuffer(std::vector< boost::shared_ptr<GizmoEventLIRC> > & EventVector, H::DynamicBuffer<char> const & Buffer); 
00076         
00077         // construction / deconstruction
00078         GizmoEventLIRC();                                               
00079         GizmoEventLIRC(std::string code, int repeat, std::string button, std::string remote, bool IsRemote = false); 
00080         virtual ~GizmoEventLIRC();                                      
00081 
00082 protected:
00083         
00084 private:
00085         // private functions
00086         
00087         // private member variables
00088         
00089         // static private functions
00090         
00091 private: 
00092         // serialization
00093         friend class boost::serialization::access;
00094         template<class Archive>
00095         void serialize(Archive & ar, const unsigned int version) {
00096                 ar & boost::serialization::base_object<GizmoEvent>(*this);
00097                 ar & Code;
00098                 ar & Repeat;
00099                 ar & Button;
00100                 ar & Remote;
00101         }               
00102 };
00103 
00105 
00106 } // Gizmod namespace
00107 
00108 #endif // __GizmoEventLIRC_h

Generated on Wed Nov 7 10:04:16 2007 for gizmod by  doxygen 1.5.3