Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

hk_classes/hk_classes/hk_reportdata.h

Go to the documentation of this file.
00001 // ****************************************************************************
00002 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
00003 // This file is part of the hk_classes library.
00004 // This file may be distributed and/or modified under the terms of the
00005 // GNU Library Public License version 2 as published by the Free Software
00006 // Foundation and appearing in the file COPYING included in the
00007 // packaging of this file.
00008 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00009 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00010 // ****************************************************************************
00011 #ifndef HK_REPORTDATA
00012 #define HK_REPORTDATA
00013 #include "hk_definitions.h"
00014 #include "hk_dsdatavisible.h"
00015 #include <list>
00016 #include <vector>
00017 #include <iostream>
00018 #include <fstream>
00019 #include <time.h>
00020 #include <map>
00021 using namespace std;
00022 
00023 class hk_reportsection;
00024 class hk_reportdata;
00025 class hk_report;
00026 class hk_reportdatamodeprivate;
00027 class hk_reportdataprivate;
00028 
00074 class hk_reportdata :public hk_dsdatavisible
00075 {
00076     friend class hk_reportsection;
00077     public:
00098         void set_data(const hk_string& d,bool registerchange=true);
00099         hk_string data(void);
00100         void set_beforedata(const hk_string& b,bool registerchange=true);
00101         void set_afterdata(const hk_string& a,bool registerchange=true);
00102         hk_string beforedata();
00103         hk_string afterdata();
00111         hk_string actual_string(void);
00115         void count(void);
00122         void    set_runningcount(bool c=true,bool registerchange=true);
00123         bool    runningcount(void);
00124         virtual     hk_font font(void);
00129         void set_datacountfunction(const hk_string& f,bool registerchange);
00130         hk_string datacountfunctionstring(void);
00131 
00132         reportdatacounttype* datacountfunction(void);
00139         void    set_topline(bool l=true,bool registerchange=true);
00145         void    set_bottomline(bool l=true,bool registerchange=true);
00152         void    set_leftline(bool l=true,bool registerchange=true);
00159         void    set_rightline(bool l=true,bool registerchange=true);
00167         void    set_diagonalluro(bool l=true,bool registerchange=true);
00174         void    set_diagonalloru(bool l=true,bool registerchange=true);
00175         bool    diagonalloru(void);
00176         bool    topline(void);
00177         bool    bottomline(void);
00178         bool    leftline(void);
00179         bool    rightline(void);
00180         bool    diagonalluro(void);
00186         void    set_frame(bool l=true,bool registerchange=true);
00192         void    set_linebreak(bool b=true,bool registerchange=true);
00193         bool    linebreak(void);
00194         void    set_dynamic_height(bool dynamic,bool registerchange=true);
00195         bool    dynamic_height(void) const;
00196 
00200         void    set_configurefunction(const hk_string& f,bool registerchange=true);
00201         data_configurefunctiontype* configurefunction(void);
00202         hk_string configurefunctionstring(void);
00203 
00204         virtual void    savedata(ostream& s,bool userdefined=false);
00205         virtual void  loaddata(const hk_string& definition,bool userdefined=false);
00206         void    neutralize_definition(bool registerchange);
00207 
00208         static void add_configurefunctiontype(const hk_string& name,data_configurefunctiontype* f);
00209         static list<hk_string>* configurefunctionlist(void);
00210 
00211         static void add_datacountfunctiontype(const hk_string& name,reportdatacounttype* f);
00212         static list<hk_string>* datacountfunctionlist(void);
00213 
00217         void        set_replacefunction(const hk_string& f,bool registerchange=true);
00218         static void add_datareplacefunctiontype(const hk_string& name,data_replacefunctiontype* f);
00219         static list<hk_string>* datareplacefunctionlist(void);
00220         void reset_count();
00224         hk_report* report(void);
00228         hk_reportsection* section(void);
00229 
00230         virtual void lower_widget(bool registerchange=true);
00231         virtual void raise_widget(bool registerchange=true);
00232         void set_on_print_action(const hk_string&,bool registerchange=true);
00233         hk_string on_print_action(void);
00234         list<hk_string>*  value_in_lines();
00235         
00236         unsigned int    height(void) ;
00237         bool data_fully_printed(void);
00238         void reset_data_fully_printed(void);
00239         int pagescount(void);
00240 virtual hk_string tag_value(int tagnumber, bool& ok);
00241 virtual hk_string column_value(const hk_string& colname,bool& ok);
00242 void    set_is_image(bool,bool registerchange=true );
00243 bool    is_image(void);
00244 
00245     protected:
00246         hk_reportdata(hk_reportsection*);
00247         virtual     ~hk_reportdata(void);
00248         virtual void new_column_pointer_created(void);
00249         virtual void sizetype_changed(void);
00250         virtual bool    presentationmode_changed(void);
00251 virtual bool action_on_print(void);
00252 
00253     private:
00254       void clear_counting(void);
00255 
00256         typedef  map<hk_string,data_configurefunctiontype*,less<hk_string> >  reportdataconfigurelisttype ;
00257         static    reportdataconfigurelisttype  p_reportdataconfigurefunctions;
00258         static  list<hk_string> p_reportdataconfigurelist;
00259 
00260         hk_report* p_report;
00261         hk_reportsection* p_section;
00262 
00263         typedef  map<hk_string,reportdatacounttype*,less<hk_string> >  datacountlisttype ;
00264         static    datacountlisttype  p_datacountfunctions;
00265         static  list<hk_string> p_datacountfunctionlist;
00266 
00267         typedef  map<hk_string,data_replacefunctiontype*,less<hk_string> >  datareplacelisttype ;
00268         static    datareplacelisttype  p_datareplacefunctions;
00269         static  list<hk_string> p_datareplacefunctionlist;
00270         hk_reportdatamodeprivate* p_designdata;
00271         hk_reportdatamodeprivate* p_viewdata;
00272         hk_reportdataprivate* p_private;
00273 
00274 
00275 
00276 };
00277 #endif
00278 

Generated on Thu Mar 9 18:40:40 2006 for hk_classes by  doxygen 1.4.1