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 » U++ Library support » U++ Core » Explanations of some functions
Explanations of some functions [message #10730] Wed, 25 July 2007 21:21 Go to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
Can someone please provide a quick definition/explanation of any of the following functions/classes:

class Convert, ConverDate, ConvertTime
const Convert& StdConvert()
const ConvertString& StdConvertString()

String NormalizePath(const char *path)
String NormalizeSpaces(const char* s)
String Normalize Spaces(const char* begin, const char* end)
String NativePath(const char* path)

bool LoadFromXML(T &data, const String& xml)
bool LessPath(string fa, string fb)

String GetFileTitle(const char* fp)
String GetFileFolder(...
String GetFileDirectory(...

Struct FileInfo

String AsCString(const char*s, ...)


PS: Why are many of these not in documentation?

Thanks
Re: Explanations of some functions [message #10734 is a reply to message #10730] Wed, 25 July 2007 23:55 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
captainc wrote on Wed, 25 July 2007 20:21


String NormalizePath(const char *path)
String NormalizeSpaces(const char* s)
String Normalize Spaces(const char* begin, const char* end)


It might be not a perfect explanation, but Normalize (in U++ vocabulary Smile ) in most cases means Clean or Trim or remove what's not needed. e.g. \home\\\\\\\test.txt => \home\test.text

or e.g remove "excessive_______spaces" =>"excessive_spaces"

captainc wrote on Wed, 25 July 2007 20:21


String AsCString(const char*s, ...)



I guess that one has C language standard '\0' added at the end and can be used accordingly. Smile

[Updated on: Wed, 25 July 2007 23:59]

Report message to a moderator

Re: Explanations of some functions [message #10735 is a reply to message #10734] Thu, 26 July 2007 00:20 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
inline bool LessPath(String fa, String fb) { return ComparePath(fa, fb) < 0; }


int ComparePath(String fa, String fb) {
	int la = fa.GetLength(), lb = fb.GetLength();
	int r = ComparePath(fa, fb, min(la, lb));
	return r ? r : cmp(la, lb);
}


if first path (fa) is shorter (count letters or symbols) than second (fb)

(not tested Smile)

[Updated on: Thu, 26 July 2007 00:21]

Report message to a moderator

Re: Explanations of some functions [message #10736 is a reply to message #10730] Thu, 26 July 2007 00:34 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
captainc wrote on Wed, 25 July 2007 20:21


...
PS: Why are many of these not in documentation?

Thanks

Some are self-explaining from their name, some - explained in forums , some - don't have manpower or priorities to be documented Smile, some - very easy to test or just jump from Assist++ to their code.
Have you already learned how to jump with Assist++ alt_ shortcuts to definitions /declarations?
Re: Explanations of some functions [message #10740 is a reply to message #10736] Thu, 26 July 2007 15:13 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
Quote:


... some - very easy to test or just jump from Assist++ to their code.
Have you already learned how to jump with Assist++ alt_ shortcuts to definitions /declarations?



No, I have not learned how to use Assist++ much yet; I will do some exploring.

Thanks

[Updated on: Thu, 26 July 2007 15:13]

Report message to a moderator

Re: Explanations of some functions [message #10741 is a reply to message #10740] Thu, 26 July 2007 15:37 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
explore and try ALL Assist menu items (when cursor inside a word)
PLUS combine them with alt_<- (left arrow right arrow) to go back-forward from file to file positions (after using any of the above).
PLUS - don't forget Ctrl_space...

[Updated on: Thu, 26 July 2007 15:38]

Report message to a moderator

Re: Explanations of some functions [message #10742 is a reply to message #10741] Thu, 26 July 2007 15:45 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
Also, it's very useful to spy ide packages code or examples or any packages or dirs with Ctrl_Shift_F (global find).
Just don't forget to use droplists on the right side.
Re: Explanations of some functions [message #10767 is a reply to message #10742] Sat, 28 July 2007 00:31 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
captainc, if you are still struggling, please don't hesitate to ask again. And sorry, Convert things are not my cup of tea. Any volunteers?
Re: Explanations of some functions [message #10772 is a reply to message #10767] Sat, 28 July 2007 09:40 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Basically the Convert classes provide a standard interface for converting between strings and various types, including extra validation such as limiting the number of input characters. These are primarily used by EditString, EditInt etc. as data parsers. See this thread for a good explanation.

Re: Explanations of some functions [message #10823 is a reply to message #10772] Tue, 31 July 2007 20:12 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
Simple input validation functionality would be great. Thanks for the info, though I still am not sure how or when to use the Convert classes. What was the intention for the class in terms of how it would be used? in what cases/scenarios?
Re: Explanations of some functions [message #10824 is a reply to message #10823] Tue, 31 July 2007 21:20 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
captainc wrote


Can someone please provide a quick definition/explanation of any of the following functions/classes:

class Convert, ConverDate, ConvertTime
const Convert& StdConvert()
const ConvertString& StdConvertString()

String NormalizePath(const char *path)
String NormalizeSpaces(const char* s)
String Normalize Spaces(const char* begin, const char* end)
String NativePath(const char* path)

bool LoadFromXML(T &data, const String& xml)
bool LessPath(string fa, string fb)

String GetFileTitle(const char* fp)
String GetFileFolder(...
String GetFileDirectory(...

Struct FileInfo

String AsCString(const char*s, ...)


PS: Why are many of these not in documentation?

Thanks


...
captainc wrote on Tue, 31 July 2007 19:12

Simple input validation functionality would be great. Thanks for the info, though I still am not sure how or when to use the Convert classes. What was the intention for the class in terms of how it would be used? in what cases/scenarios?


Great news! Your questions are improving... Wink
captainc, I'm very sorry, but your topic starter question sounded more like: "Can someone explain modern history, architecture and how to drive a car in 1 minute or read and write a quick tutorial for me"...
(I'd gently recommend the link in my signature... Smile )

captainc wrote


Why are many of these not in documentation?


Then, which?

And... have you, actually, read the documentation? E.g
http://www.ultimatepp.org/src$Core$Convert$en-us.html

P.S And, please, narrow your questions into separate topics...


Re: Explanations of some functions [message #10825 is a reply to message #10824] Tue, 31 July 2007 23:26 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
Quote:

And... have you, actually, read the documentation? E.g
http://www.ultimatepp.org/src$Core$Convert$en-us.html


Yes, I have been through documentation and examples. My apologies for missing this one.

Re: Explanations of some functions [message #10828 is a reply to message #10825] Wed, 01 August 2007 01:57 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
captainc wrote on Tue, 31 July 2007 22:26

Quote:

And... have you, actually, read the documentation? E.g
http://www.ultimatepp.org/src$Core$Convert$en-us.html


Yes, I have been through documentation and examples. My apologies for missing this one.




Every mistake must be a source of improvement and innovation. Smile
In many cases, I'm trying not only to answer the questions but also stimulate improvement on all U++ fronts and ... even have some fun.
Don't take seriously... Smile
Twisted Evil
After I had written so many critical words in the forums about theide F1 and search, and some well-known people have been putting so many efforts into it, now a user just needs to enter a word e.g "Convert" into a search field and U++ help system TreeCtrl opens all related Topic items...

So, I'm very interested - how did it happen? Shocked
1. You haven't pressed F1
2. You haven't found where to enter "Convert".
3. You didn't have an idea that you need to enter "Convert".
4. You didn't know that all the documentation is on the website and there's a similar search field on the left side with a letter G.
5. You only open the top No 1 google link and not No2 because:
5.1 don't have a habit of deep searching...
5.2 didn't expect documentation from open source project
5.3 other reasons.

P.S. These questions might be useful for the "future generations" of U++ users... Smile
Re: Explanations of some functions [message #10909 is a reply to message #10828] Sat, 04 August 2007 04:49 Go to previous message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
6. After an initial but not in-depth search, I required alternate and further explanation.

I was looking for documentation within TheIDE's help section, but I don't think I was able to find it due to the way I was navigating the help section. For example, there is no 'clear' or 'reset' button (although now I see that you can just hit enter again) and I was not sure that I was searching the entire help or just the highlighted sections. Also, I was not sure if the button next to the search box was a toggle button (for full text search or not) or the search button to initiate the search. I need to get used to that search functionality. Long story short, I didn't find it on the first try.

I think the issue for me mostly lies in that fact that I am in a learning phase with C++ in general, and trying to go from beginner to intermediate and use C++ in a professional environment. I have not been able to even use the standard library to its fullest extent yet. There is a lot of information I am trying to soak up right now and I was looking for an easy way to get quick answers to some questions while continuing to research. I came to Upp initially not for its improvements over standard C++, but for its ability to provide easy memory management and higher level/packaged cross-platform functionality. The NTL attracted me due to its functionality especially vectors, arrays, strings, and file I/O (little and big-endian for reading from files made my life easy at one point). There are many aspects of Upp that are beginner friendly, but some that are not as well. Good forum support is essential for me here and is much appreciated, especially when you need to bounce ideas around with others in order to open up your own mind or clear a mental block.

After writing one application successfully with Upp, I want to learn the whole thing in an out and all of its functionality instead of just the basics.

Previous Topic: Compatibility change
Next Topic: Core split
Goto Forum:
  


Current Time: Sun Apr 28 22:05:50 CEST 2024

Total time taken to generate the page: 0.05003 seconds