Filter Library Camera Interface Physics

ToolStringPrefix.h

00001 /*
00002  * ToolStringPrefix.h - format a number with a prefix.
00003  *
00004  * This file is part of the Camera Filter Library.
00005  * Computer Aided Measurement Environment for Realtime Atomic imaging (Camera)
00006  *
00007  * Copyright (C) 2004, Leiden Probe Microscopy.
00008  * Copyright (C) 2004, Universiteit Leiden.
00009  *
00010  * Authors: Martin J. Moene (original)
00011  *
00012  * $Id: ToolStringPrefix.h 213 2005-06-13 10:48:33Z moene $
00013  */
00014 
00015 /*
00016  * Inspired on:
00017  * Simple CString Extension, By Marc Clifton
00018  * http://www.codeproject.com/string/cstringex.asp
00019  */
00020 
00021 #ifndef CFL_TOOLSTRINGPREFIX_H
00022 #define CFL_TOOLSTRINGPREFIX_H
00023 
00024 //#include <afx.h>                        // for class CString
00025 
00026 /**
00027  * \addtogroup cfl_dialog
00028  *
00029  * @{
00030  */
00031 
00032 DECLARE_CLASS( CStringPrefix );
00033 
00034 /**
00035  * a CString that can format a number as 1.23m; uses printf-like format.
00036  */
00037 
00038 class CStringPrefix : public CString
00039 {
00040 public:
00041    CStringPrefix( double value, const char* format = "%.3lg" );
00042    virtual ~CStringPrefix();
00043 };
00044 
00045 /// @}
00046 
00047 /**
00048  * destructor
00049  */
00050 
00051 inline CStringPrefix::~CStringPrefix()
00052 {
00053    ; // do nothing here
00054 }
00055 
00056 #endif // #ifndef CFL_TOOLSTRINGPREFIX_H
00057 
00058 /*
00059  * end of file
00060  */
00061 

Camera Filter Library documentation © 2004-2007 by Leiden Probe Microscopy