file_info_const_impl.h

Go to the documentation of this file.
00001 #define __file_info_const_impl_have_hintmap__
00002 
00004 class file_info_const_impl : public file_info
00005 {
00006 public:
00007         file_info_const_impl(const file_info & p_source) {copy(p_source);}
00008         file_info_const_impl(const file_info_const_impl & p_source) {copy(p_source);}
00009         file_info_const_impl() {m_meta_count = m_info_count = 0; m_length = 0; m_replaygain.reset();}
00010 
00011         double          get_length() const {return m_length;}
00012         
00013         t_size          meta_get_count() const {return m_meta_count;}
00014         const char*     meta_enum_name(t_size p_index) const {return m_meta[p_index].m_name;}
00015         t_size          meta_enum_value_count(t_size p_index) const;
00016         const char*     meta_enum_value(t_size p_index,t_size p_value_number) const;
00017         t_size          meta_find_ex(const char * p_name,t_size p_name_length) const;
00018 
00019         t_size          info_get_count() const {return m_info_count;}
00020         const char*     info_enum_name(t_size p_index) const {return m_info[p_index].m_name;}
00021         const char*     info_enum_value(t_size p_index) const {return m_info[p_index].m_value;}
00022 
00023 
00024         const file_info_const_impl & operator=(const file_info & p_source) {copy(p_source); return *this;}
00025         const file_info_const_impl & operator=(const file_info_const_impl & p_source) {copy(p_source); return *this;}
00026         void copy(const file_info & p_source);
00027         void reset();
00028 
00029         replaygain_info get_replaygain() const {return m_replaygain;}
00030 
00031 private:
00032         void            set_length(double p_length) {throw pfc::exception_bug_check_v2();}
00033 
00034         t_size          meta_set_ex(const char * p_name,t_size p_name_length,const char * p_value,t_size p_value_length) {throw pfc::exception_bug_check_v2();}
00035         void            meta_insert_value_ex(t_size p_index,t_size p_value_index,const char * p_value,t_size p_value_length) {throw pfc::exception_bug_check_v2();}
00036         void            meta_remove_mask(const bit_array & p_mask) {throw pfc::exception_bug_check_v2();}
00037         void            meta_reorder(const t_size * p_order) {throw pfc::exception_bug_check_v2();}
00038         void            meta_remove_values(t_size p_index,const bit_array & p_mask) {throw pfc::exception_bug_check_v2();}
00039         void            meta_modify_value_ex(t_size p_index,t_size p_value_index,const char * p_value,t_size p_value_length) {throw pfc::exception_bug_check_v2();}
00040 
00041         t_size          info_set_ex(const char * p_name,t_size p_name_length,const char * p_value,t_size p_value_length) {throw pfc::exception_bug_check_v2();}
00042         void            info_remove_mask(const bit_array & p_mask) {throw pfc::exception_bug_check_v2();}
00043 
00044         void                    set_replaygain(const replaygain_info & p_info) {throw pfc::exception_bug_check_v2();}
00045         
00046         t_size          meta_set_nocheck_ex(const char * p_name,t_size p_name_length,const char * p_value,t_size p_value_length) {throw pfc::exception_bug_check_v2();}
00047         t_size          info_set_nocheck_ex(const char * p_name,t_size p_name_length,const char * p_value,t_size p_value_length) {throw pfc::exception_bug_check_v2();}
00048 public:
00049         struct meta_entry {
00050                 const char * m_name;
00051                 t_size m_valuecount;
00052                 const char * const * m_valuemap;
00053         };
00054 
00055         struct info_entry {
00056                 const char * m_name;
00057                 const char * m_value;
00058         };
00059 
00060 #ifdef __file_info_const_impl_have_hintmap__
00061         typedef t_uint32 t_index;
00062         enum {hintmap_cutoff = 20};
00063 #endif//__file_info_const_impl_have_hintmap__
00064 private:
00065         pfc::array_t<char> m_buffer;
00066         t_index m_meta_count;
00067         t_index m_info_count;
00068         
00069         const meta_entry * m_meta;
00070         const info_entry * m_info;
00071 
00072 #ifdef __file_info_const_impl_have_hintmap__
00073         const t_index * m_hintmap;
00074 #endif
00075 
00076         double m_length;
00077         replaygain_info m_replaygain;
00078 };

Generated on Thu Aug 28 21:15:30 2008 for foobar2000 SDK by  doxygen 1.5.5