"Fossies" - the Fresh Open Source Software Archive

Member "xosview-1.23/gnu/MeterMaker.cc" (11 Jul 2020, 765 Bytes) of package /linux/misc/xosview-1.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "MeterMaker.cc" see the Fossies "Dox" file reference documentation.

    1 //
    2 //  Copyright (c) 1994, 1995, 2002 by Mike Romberg ( romberg@fsl.noaa.gov )
    3 //  2007 by Samuel Thibault ( samuel.thibault@ens-lyon.org )
    4 //
    5 //  This file may be distributed under terms of the GPL
    6 //
    7 
    8 #include "MeterMaker.h"
    9 #include "xosview.h"
   10 
   11 #include "memmeter.h"
   12 #include "swapmeter.h"
   13 #include "pagemeter.h"
   14 #include "loadmeter.h"
   15 
   16 #include <stdlib.h>
   17 
   18 
   19 MeterMaker::MeterMaker(XOSView *xos){
   20   _xos = xos;
   21 }
   22 
   23 void MeterMaker::makeMeters(void){
   24   if (_xos->isResourceTrue("load"))
   25     push(new LoadMeter(_xos));
   26 
   27   if (_xos->isResourceTrue("mem"))
   28     push(new MemMeter(_xos));
   29   if (_xos->isResourceTrue("swap"))
   30     push(new SwapMeter(_xos));
   31 
   32   if (_xos->isResourceTrue("page"))
   33     push(new PageMeter(_xos, atof(_xos->getResource("pageBandwidth"))));
   34 }