LCOV - code coverage report
Current view: top level - stdcasa - record.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 1 1 100.0 %
Date: 2024-12-11 20:54:31 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #ifndef __casac_record_h__
       2             : #define __casac_record_h__
       3             : 
       4             : #include <map>
       5             : #include <string>
       6             : #include <stdcasa/variant.h>
       7             : 
       8             : namespace casac {
       9             : 
      10             : typedef std::map<std::string,variant> rec_map;
      11             : 
      12             : // todo:        o create python to/from record functions
      13             : //              o implement compare()
      14             : //              o implement record_to_string()
      15             : //              o create a thorough test program
      16             : //              o verify that std::map<>'s copy ctor does a complete copy
      17             : //              o add copy-on-write (w/ reference counting)
      18             : //
      19             : class record : public  rec_map {
      20             :     public:
      21             :         typedef rec_map::iterator iterator;
      22             :         typedef rec_map::const_iterator const_iterator;
      23             :         typedef rec_map::value_type value_type;
      24             : 
      25             :         record();
      26             :         record *clone() const { return new record(*this); }
      27             :         int compare(const record*) const;
      28             : 
      29     6074188 :         record( const record &r ) : rec_map(r) { }
      30             :         record &operator=(const record &r) { rec_map::operator=(r); return *this; }
      31             :         std::pair<rec_map::iterator,bool> insert(const std::string &s,const variant &v);
      32             : };
      33             : record initialize_record( const std::string & );
      34             : }       // casac namespace
      35             : 
      36             : #endif

Generated by: LCOV version 1.16