Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages | Examples

ArStringInfoGroup.h

00001 /*
00002 MobileRobots Advanced Robotics Interface for Applications (ARIA)
00003 Copyright (C) 2004, 2005 ActivMedia Robotics LLC
00004 Copyright (C) 2006, 2007 MobileRobots Inc.
00005 
00006      This program is free software; you can redistribute it and/or modify
00007      it under the terms of the GNU General Public License as published by
00008      the Free Software Foundation; either version 2 of the License, or
00009      (at your option) any later version.
00010 
00011      This program is distributed in the hope that it will be useful,
00012      but WITHOUT ANY WARRANTY; without even the implied warranty of
00013      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014      GNU General Public License for more details.
00015 
00016      You should have received a copy of the GNU General Public License
00017      along with this program; if not, write to the Free Software
00018      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020 If you wish to redistribute ARIA under different terms, contact 
00021 MobileRobots for information about a commercial version of ARIA at 
00022 robots@mobilerobots.com or 
00023 MobileRobots Inc, 19 Columbia Drive, Amherst, NH 03031; 800-639-9481
00024 */
00025 
00026 #ifndef ARSTRINGINFOGROUP_H
00027 #define ARSTRINGINFOGROUP_H
00028 
00029 #include "ariaUtil.h"
00030 #include "ArMutex.h"
00031 #include <string>
00032 #include <set>
00033 #include <list>
00034 
00040 class ArStringInfoGroup
00041 {
00042 public:
00044   AREXPORT ArStringInfoGroup();
00046   AREXPORT virtual ~ArStringInfoGroup();
00048   AREXPORT bool addString(const char *name, ArTypes::UByte2 maxLen, 
00049               ArFunctor2<char *, ArTypes::UByte2> *functor);
00050 
00052   AREXPORT bool addStringInt(const char *name, ArTypes::UByte2 maxLen, 
00053                  ArRetFunctor<int> *functor, 
00054                  const char *format = "%d");
00055 
00057   AREXPORT bool addStringDouble(const char *name, ArTypes::UByte2 maxLen, 
00058                 ArRetFunctor<double> *functor, 
00059                 const char *format = "%g");
00060 
00062   AREXPORT bool addStringBool(const char *name, ArTypes::UByte2 maxLen, 
00063                   ArRetFunctor<bool> *functor,
00064                   const char *format = "%s");
00065 
00067   AREXPORT bool addStringString(const char *name, ArTypes::UByte2 maxLen, 
00068                   ArRetFunctor<const char *> *functor,
00069                   const char *format = "%s");
00071   AREXPORT void addAddStringCallback(
00072       ArFunctor3<const char *, ArTypes::UByte2,
00073       ArFunctor2<char *, ArTypes::UByte2> *> *functor,
00074       ArListPos::Pos position = ArListPos::LAST);
00075 
00076 protected:
00077   ArMutex myDataMutex;
00078   std::set<std::string, ArStrCaseCmpOp> myAddedStrings;
00079   std::list<ArFunctor3<const char *, ArTypes::UByte2,
00080           ArFunctor2<char *, ArTypes::UByte2> *> *> myAddStringCBList;
00081 };
00082 
00083 
00084 #endif // ARSTRINGINFOHELPER_H

Generated on Tue Feb 20 10:51:41 2007 for Aria by  doxygen 1.4.0