vtkTagTable.h
Go to the documentation of this file.00001 #ifndef __vtkTagTable_h
00002 #define __vtkTagTable_h
00003
00004 #include "vtkObject.h"
00005 #include "vtkTable.h"
00006 #include "vtkMRML.h"
00007
00008 #include <vtksys/SystemTools.hxx>
00009 #include <string>
00010 #include <map>
00011
00012 class VTK_MRML_EXPORT vtkTagTable : public vtkObject
00013 {
00014 public:
00016 static vtkTagTable *New();
00017 vtkTypeRevisionMacro(vtkTagTable, vtkObject);
00018 void PrintSelf(ostream& os, vtkIndent indent);
00019
00022 vtkGetStringMacro ( Name );
00023 vtkSetStringMacro ( Name );
00024
00025 vtkGetMacro ( RestoreSelectionState, int);
00026 vtkSetMacro ( RestoreSelectionState, int);
00027
00031 virtual void Initialize() { };
00032
00035 virtual void AddOrUpdateTag ( const char *attribute, const char *value );
00038 virtual void AddOrUpdateTag ( const char *attribute, const char *value, int selected );
00041 virtual void AddUniqueTag ( const char *attribute, const char *value );
00044 virtual int UpdateTag ( const char *attribute, const char *value );
00045 virtual int UpdateTag ( const char *attribute, const char *value, int selected );
00046
00049 virtual const char *GetTagAttribute ( int index);
00050
00053 virtual const char *GetTagValue ( int index );
00054
00057 virtual const char *GetTagValue ( const char* attribute);
00058
00062 virtual int CheckTableForTag ( const char *attribute, const char *value );
00063
00066 virtual int CheckTableForTag ( const char *attribute );
00067
00068 virtual void SelectTag ( const char *attribute );
00069 virtual void DeselectTag ( const char *attribute );
00070 virtual int IsTagSelected ( const char *attribute );
00071
00072
00075 virtual void DeleteTag ( const char *attribute );
00076
00079 virtual void ClearTagTable ( );
00080
00083 virtual int GetNumberOfTags ( );
00084
00086 virtual void Copy( vtkTagTable *t);
00087
00088
00090 std::map<std::string, std::string> TagTable;
00092 std::map<std::string, int > TagSelectionTable;
00093
00094
00095 private:
00096 char *Name;
00097 int RestoreSelectionState;
00098
00099 protected:
00100 vtkTagTable();
00101 virtual ~vtkTagTable();
00102 vtkTagTable(const vtkTagTable&);
00103 void operator=(const vtkTagTable&);
00104
00105 };
00106
00107 #endif
00108
00109
00110
00111
00112
00113