MOOS 0.2375
/home/toby/moos-ivp/MOOS-2375-Oct0611/Core/MOOSDB/MOOSDBVar.h
Go to the documentation of this file.
00001 
00002 //
00003 //   MOOS - Mission Oriented Operating Suite 
00004 //  
00005 //   A suit of Applications and Libraries for Mobile Robotics Research 
00006 //   Copyright (C) 2001-2005 Massachusetts Institute of Technology and 
00007 //   Oxford University. 
00008 //    
00009 //   This software was written by Paul Newman at MIT 2001-2002 and Oxford 
00010 //   University 2003-2005. email: pnewman@robots.ox.ac.uk. 
00011 //      
00012 //   This file is part of a  MOOS Core Component. 
00013 //        
00014 //   This program is free software; you can redistribute it and/or 
00015 //   modify it under the terms of the GNU General Public License as 
00016 //   published by the Free Software Foundation; either version 2 of the 
00017 //   License, or (at your option) any later version. 
00018 //          
00019 //   This program is distributed in the hope that it will be useful, 
00020 //   but WITHOUT ANY WARRANTY; without even the implied warranty of 
00021 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
00022 //   General Public License for more details. 
00023 //            
00024 //   You should have received a copy of the GNU General Public License 
00025 //   along with this program; if not, write to the Free Software 
00026 //   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
00027 //   02111-1307, USA. 
00028 //
00030 // MOOSDBVar.h: interface for the CMOOSDBVar class.
00031 //
00033 
00034 #if !defined(AFX_MOOSDBVAR_H__EAAB2A16_66EF_49E4_9584_51403C59150D__INCLUDED_)
00035 #define AFX_MOOSDBVAR_H__EAAB2A16_66EF_49E4_9584_51403C59150D__INCLUDED_
00036 
00037 #if _MSC_VER > 1000
00038 #pragma once
00039 #endif // _MSC_VER > 1000
00040 
00041 
00042 #include <string>
00043 #include <map>
00044 #include <set>
00045 
00046 using namespace std;
00047 
00048 typedef set<string> STRING_SET;
00049 
00050 #include "MOOSRegisterInfo.h"
00051 
00052 
00053 typedef map<string,CMOOSRegisterInfo> REGISTER_INFO_MAP;
00054 
00055 
00056 class CMOOSDBVar  
00057 {
00058 public:
00059     bool Reset();
00060     void RemoveSubscriber(string & sWho);
00061 
00062 
00063 
00064     bool AddSubscriber(string & sClient, double dfPeriod);
00065     CMOOSDBVar(const string & sName);
00066     CMOOSDBVar();
00067     virtual ~CMOOSDBVar();
00068 
00069     char   m_cDataType;
00070     double m_dfTime;
00071     double m_dfVal;
00072     double m_dfWriteFreq;
00073     int m_nOverTicks;
00074     double m_dfWrittenTime;
00075     string m_sVal;
00076     string m_sWhoChangedMe;
00077         string m_sSrcAux;
00078 
00079     int     m_nWrittenTo;
00080     string m_sName;
00081 
00082     string m_sOriginatingCommunity;
00083 
00084     REGISTER_INFO_MAP m_Subscribers;
00085     STRING_SET m_Writers;
00086 
00087 };
00088 
00089 #endif // !defined(AFX_MOOSDBVAR_H__EAAB2A16_66EF_49E4_9584_51403C59150D__INCLUDED_)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines