Date post: | 25-May-2015 |
Category: |
Education |
Upload: | michel-alves |
View: | 67 times |
Download: | 0 times |
Reference Manual
Generated by Doxygen 1.6.3
Sun Dec 4 13:27:43 2011
Contents
1 Class Index 1
1.1 Class List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 File Index 3
2.1 File List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Class Documentation 5
3.1 LibraryTime Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . 5
3.1.2.1 LibraryTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.2.2 ∼LibraryTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.3.1 Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.3.2 Get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.3.3 Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.3.4 Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 File Documentation 9
4.1 LibraryTime.cxx File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2 LibraryTime.cxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3 LibraryTime.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.4 LibraryTime.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.5 Sys-LibraryTime.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.5.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.5.1.1 main . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.6 Sys-LibraryTime.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Chapter 1
Class Index
1.1 Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
LibraryTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Chapter 2
File Index
2.1 File List
Here is a list of all files with brief descriptions:
LibraryTime.cxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9LibraryTime.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Sys-LibraryTime.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 3
Class Documentation
3.1 LibraryTime Class Reference
#include <LibraryTime.h>
Public Member Functions
• LibraryTime ()
• void Start (void)
• void Stop (void)
• double Get (void)
• void Delay (const int miliseconds)
• virtual ∼LibraryTime ()
3.1.1 Detailed Description
Classe que executa verificação de tempo decorrido para realização de determinadas tarefas. Usada parafazer análise de complexidade computacional em relação a quanto tempo um determinado trecho de códigoconsome para ser realizado. O retorno é dado em milisegundos com base no clock da máquina.
Definition at line 19 of file LibraryTime.h.
3.1.2 Constructor & Destructor Documentation
3.1.2.1 LibraryTime::LibraryTime () [inline]
Método construtor da classe.
Definition at line 35 of file LibraryTime.h.
00035 {};
6 Class Documentation
3.1.2.2 virtual LibraryTime::∼LibraryTime () [inline, virtual]
Método destrutor da classe responsável por desalocar quaisquer recursos previamente alocados retornandoos mesmos ao sistema.
Definition at line 66 of file LibraryTime.h.
00066 {};
3.1.3 Member Function Documentation
3.1.3.1 void LibraryTime::Delay (const int miliseconds) [inline]
Método que imprime uma pausa em milisegundos na execução do fluxo do programa a partir do ponto ondeela foi chamada.
Definition at line 59 of file LibraryTime.h.
00060 { clock_t exit_time = clock() + miliseconds; while(clock() <= exit_time); }
3.1.3.2 double LibraryTime::Get (void) [inline]
Método responsável por retornar o intervalo em milisegundos decorrido entre as chamadas dos métodoStart() e Stop()
Definition at line 53 of file LibraryTime.h.
00053 { return double( stop - start )/CLOCKS_PER_SEC; }
Here is the caller graph for this function:
LibraryTime::Get main
3.1.3.3 void LibraryTime::Start (void) [inline]
Método responsável por capturar o tempo ou intervalo inicial de execução de alguma operação.
Definition at line 41 of file LibraryTime.h.
00041 { start = clock(); }
Here is the caller graph for this function:
LibraryTime::Start main
Generated on Sun Dec 4 13:27:43 2011 by Doxygen
3.1 LibraryTime Class Reference 7
3.1.3.4 void LibraryTime::Stop (void) [inline]
Método responsável por capturar o tempo ou intervalo de interrupção de execução de alguma operação.
Definition at line 47 of file LibraryTime.h.
00047 { stop = clock(); }
Here is the caller graph for this function:
LibraryTime::Stop main
The documentation for this class was generated from the following file:
• LibraryTime.h
Generated on Sun Dec 4 13:27:43 2011 by Doxygen
8 Class Documentation
Generated on Sun Dec 4 13:27:43 2011 by Doxygen
Chapter 4
File Documentation
4.1 LibraryTime.cxx File Reference
#include "LibraryTime.h"
#include <ctime>
Include dependency graph for LibraryTime.cxx:
LibraryTime.cxx
ctime
This graph shows which files directly or indirectly include this file:
LibraryTime.cxx
10 File Documentation
4.2 LibraryTime.cxx
00001 /*00002 * TimeInterval.cpp00003 *00004 * Created on: 26/10/200900005 * Author: Michel Alves dos Santos00006 */0000700008 #include "LibraryTime.h"0000900010
Generated on Sun Dec 4 13:27:43 2011 by Doxygen
4.3 LibraryTime.h File Reference 11
4.3 LibraryTime.h File Reference
#include <ctime>
Include dependency graph for LibraryTime.h:
LibraryTime.h
ctime
This graph shows which files directly or indirectly include this file:
LibraryTime.h
Sys-LibraryTime.cpp
Classes
• class LibraryTime
Generated on Sun Dec 4 13:27:43 2011 by Doxygen
12 File Documentation
4.4 LibraryTime.h
00001 /*00002 * TimeInterval.h00003 *00004 * Created on: 26/10/200900005 * Author: Michel Alves dos Santos00006 */0000700008 #ifndef LIBRARYTIME_H_00009 #define LIBRARYTIME_H_0001000011 #include <ctime>0001200019 class LibraryTime00020 {00024 clock_t start;0002500029 clock_t stop;0003000031 public:00035 LibraryTime() {};0003600041 void Start(void) { start = clock(); }0004200047 void Stop(void) { stop = clock(); }0004800053 double Get(void) { return double( stop - start )/CLOCKS_PER_SEC; }0005400059 void Delay(const int miliseconds)00060 { clock_t exit_time = clock() + miliseconds; while(clock() <= exit_time); }0006100066 virtual ~LibraryTime() {};00067 };0006800069 #endif /* LIBRARYTIME_H_ */
Generated on Sun Dec 4 13:27:43 2011 by Doxygen
4.5 Sys-LibraryTime.cpp File Reference 13
4.5 Sys-LibraryTime.cpp File Reference
#include <iostream>
#include "LibraryTime.h"
Include dependency graph for Sys-LibraryTime.cpp:
Sys-LibraryTime.cpp
iostream LibraryTime.h
ctime
Functions
• int main (int argc, char ∗argv[ ])
4.5.1 Function Documentation
4.5.1.1 int main (int argc, char ∗ argv[ ])
Função para testes com a biblioteca.
Definition at line 13 of file Sys-LibraryTime.cpp.
00014 {00015 //Declaração de um objeto do tipo LibraryTime00016 LibraryTime t;0001700018 //Inicio da captura de tempo00019 t.Start();0002000021 //Mensagem de teste.00022 std::cout << "!!!Hello World!!!" << std::endl;0002300024 //Término da captura de tempo00025 t.Stop();0002600027 //Tempo consumido para execução do programa00028 std::cout << "Tempo consumido: " << t.Get() << std::endl;00029 return 0;00030 }
Here is the call graph for this function:
main
LibraryTime::Get
LibraryTime::Start
LibraryTime::Stop
Generated on Sun Dec 4 13:27:43 2011 by Doxygen
14 File Documentation
4.6 Sys-LibraryTime.cpp
00001 //============================================================================00002 // Name : LibraryTime00003 // Author : Michel Alves dos Santos00004 // Version : 1.0 beta00005 //============================================================================0000600007 #include <iostream>00008 #include "LibraryTime.h"0000900013 int main(int argc, char* argv[])00014 {00015 //Declaração de um objeto do tipo LibraryTime00016 LibraryTime t;0001700018 //Inicio da captura de tempo00019 t.Start();0002000021 //Mensagem de teste.00022 std::cout << "!!!Hello World!!!" << std::endl;0002300024 //Término da captura de tempo00025 t.Stop();0002600027 //Tempo consumido para execução do programa00028 std::cout << "Tempo consumido: " << t.Get() << std::endl;00029 return 0;00030 }
Generated on Sun Dec 4 13:27:43 2011 by Doxygen
Index
∼LibraryTimeLibraryTime, 5
DelayLibraryTime, 6
GetLibraryTime, 6
LibraryTime, 5∼LibraryTime, 5Delay, 6Get, 6LibraryTime, 5Start, 6Stop, 6
LibraryTime.cxx, 9LibraryTime.h, 11
mainSys-LibraryTime.cpp, 13
StartLibraryTime, 6
StopLibraryTime, 6
Sys-LibraryTime.cpp, 13main, 13