Home | Develop | Download | Contact
example_ra_progress.cpp

Programa para el testeo de las funciones.

Programa para el testeo de las funciones.Para compilar o código example_ra_progress.cpp:

g++ -static -o example_ra_progress example_ra_progress.cpp -lpdsramm

Para executar o programa:

./example_ra_progress

Retornando por consola:

 200/200 [========================================] -- Some text
 200/200 [========================================] -- ERT  0:00 -- Some text
 200/200 [100.0%] -- Some text
 200/200 [100.0%] -- ERT  0:00 -- Some text
 [100.0%] Some text
 [100.0%] -- ERT  0:00 -- Some text

Código example_ra_progress.cpp:

#include <Pds/Ra>
int main(void)
{
unsigned int n;
unsigned int N=200;
unsigned int BarSize=40;
double T=0.02;
for(n=0;n<N;n++)
{
Pds::Ra::ProgressBar(BarSize,n,N,false,"Some text");
}
std::cout<<std::endl;
for(n=0;n<N;n++)
{
Pds::Ra::ProgressBarWithTime(BarSize,n,N,false,"Some text");
}
std::cout<<std::endl;
for(n=0;n<N;n++)
{
Pds::Ra::ProgressPercent(n,N,false,"Some text");
}
std::cout<<std::endl;
for(n=0;n<N;n++)
{
Pds::Ra::ProgressPercentWithTime(n,N,false,"Some text");
}
std::cout<<std::endl;
for(n=0;n<N;n++)
{
Pds::Ra::Percent(n,N,false,"Some text");
}
std::cout<<std::endl;
for(n=0;n<N;n++)
{
Pds::Ra::PercentWithTime(n,N,false,"Some text");
}
std::cout<<std::endl;
}
void Percent(unsigned int n, unsigned int N, bool Jump, std::string str)
muestra un porcentaje de progreso en el formato
void ProgressPercent(unsigned int n, unsigned int N, bool Jump, std::string str)
muestra un porcentaje de progreso en el formato
void PercentWithTime(unsigned int n, unsigned int N, bool Jump, std::string str)
muestra un porcentaje de progreso en el formato
void ProgressBarWithTime(unsigned int BarSize, unsigned int n, unsigned int N, bool Jump, std::string str)
muestra una barra de progreso en el formato
void ProgressBar(unsigned int BarSize, unsigned int n, unsigned int N, bool Jump, std::string str="")
muestra una barra de progreso en el formato
void ProgressPercentWithTime(unsigned int n, unsigned int N, bool Jump, std::string str)
muestra un porcentaje de progreso en el formato
void DelayS(double seconds)
Genera un retardo en segundos.

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed