Menu

[r3938]: / branches / transforms / src / mplutils.h  Maximize  Restore  History

Download this file

41 lines (32 with data), 680 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* mplutils.h --
*
* $Header$
* $Log$
* Revision 1.2 2004/11/24 15:26:12 jdh2358
* added Printf
*
* Revision 1.1 2004/06/24 20:11:17 jdh2358
* added mpl src
*
*/
#ifndef _MPLUTILS_H
#define _MPLUTILS_H
#include <string>
#include <iostream>
#include <sstream>
void _VERBOSE(const std::string&);
#undef CLAMP
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
#undef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
class Printf
{
private :
char *buffer;
public :
Printf(const char *, ...);
~Printf();
std::string str() {return buffer;}
friend std::ostream &operator <<(std::ostream &, const Printf &);
};
#endif
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.