source: trunk/src/core/RpUtils.cc @ 1030

Last change on this file since 1030 was 665, checked in by dkearney, 17 years ago

Updates to Rappture::Utils::progress for all languages
removed the dependancy on Rappture.Units from within number.py, it should only depend on Rappture which will include Rappture.Units
added Rappture.Units as a module to load when people import Rappture in python.
added -V pbs variable to queue.py to include qsub environment variables in the submitted job.
updated setup.py.in to install Rappture.Utils
added progress bar to all app-fermi examples showing how to use the Rappture::Utils::progress function in all languages.
added destructor definitions to Node classes in src2/core

File size: 974 bytes
Line 
1/*
2 * ======================================================================
3 *  Rappture::Utils
4 *
5 *  AUTHOR:  Derrick Kearney, Purdue University
6 *
7 *  Copyright (c) 2004-2007  Purdue Research Foundation
8 * ----------------------------------------------------------------------
9 *  See the file "license.terms" for information on usage and
10 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 * ======================================================================
12 */
13
14#include <iostream>
15#include "RpUtils.h"
16
17#ifdef __cplusplus
18    extern "C" {
19#endif // ifdef __cplusplus
20
21using namespace Rappture::Utils;
22
23int progress(int percent, const char* text)
24{
25    int retVal = 0;
26    if (text != NULL) {
27        std::cout << "=RAPPTURE-PROGRESS=>" << percent << " " << text << std::endl;
28    }
29    else {
30        std::cout << "=RAPPTURE-PROGRESS=>" << percent << std::endl;
31    }
32    return retVal;
33}
34
35
36#ifdef __cplusplus
37}
38#endif // ifdef __cplusplus
Note: See TracBrowser for help on using the repository browser.