00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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