casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
DisplayDataOptions.h
Go to the documentation of this file.
00001 
00002 #ifndef DISPLAY_DISPLAY_DATA_OPTIONS_H_
00003 #define DISPLAY_DISPLAY_DATA_OPTIONS_H_
00004 
00005 #include <map>
00006 
00007 namespace casa {
00008     namespace viewer {
00009 
00010         class DisplayDataOptions {
00011             public:
00012 
00013                 typedef std::map<string,string> map_type;
00014                 typedef map_type::iterator iterator;
00015                 typedef map_type::const_iterator const_iterator;
00016                 typedef map_type::reverse_iterator reverse_iterator;
00017                 typedef map_type::const_reverse_iterator const_reverse_iterator;
00018 
00019                 iterator begin( ) { return options.begin(); }
00020                 iterator end( ) { return options.end( ); }
00021                 const_iterator begin( ) const { return options.begin( ); }
00022                 const_iterator end( ) const { return options.end( ); }
00023                 reverse_iterator rbegin( ) { return options.rbegin( ); }
00024                 reverse_iterator rend( ) { return options.rend( ); }
00025                 const_reverse_iterator rbegin( ) const { return options.rbegin( ); }
00026                 const_reverse_iterator rend( ) const { return options.rend( ); }
00027 
00028                 string &operator[]( const string &key ) { return options[key]; }
00029                 const string &operator[]( const string &key ) const { return ((DisplayDataOptions*)this)->options[key]; }
00030 
00031                 map_type::size_type size( ) const { return options.size( ); }
00032 
00033                 void insert( const string &key, const string &value ) { options.insert(std::pair<string,string>(key,value)); }
00034 
00035                 bool empty( ) const { return options.empty( ); }
00036 
00037             private:
00038                 map_type options;
00039         };
00040     }
00041 }
00042 
00043 #endif