Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » More new functions
Re: More new functions [message #18840 is a reply to message #18804] Sun, 26 October 2008 10:19 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3432
Registered: August 2008
Senior Veteran
Hello captainc

Thats it. In some cases is more than grouping functions indeed.
For example in the "SysCPU" functions related with the CPU info, the program gets all the information in one time so, for String GetSpeed() it will get all information for just getting the speed. As this information does not change while the program is running (CPU make, number, speed, etc), the class would gather all the info one time so the function would be like this:

SysCPU::GetSpeed() {return speed;};

In "SysProcesses" functions it is a little different as the processes info is something changing so we could have at the same cost two focus:
- class SysProcesses //Current processes info.
bool Update(); // Gets processes info
bool GetFirst(int &processId, String &pName);
vool GetNext(int &processId, String &pName);

or
- bool GetProcessesList(Array<int>&pid, Array<String>&name);

Best regards
Koldo

(P.D. Class and function names are just a proposal that you could change)


Best regards
IƱaki

[Updated on: Sun, 26 October 2008 10:20]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Simple app-wide "macros"
Next Topic: Grid helper
Goto Forum:
  


Current Time: Thu May 08 06:14:22 CEST 2025

Total time taken to generate the page: 0.02248 seconds