Functions | |
void | Begin_Line_Style_Search (void) |
void | Show_Line_Style_Count (int *count) |
HC_BOOLEAN | Find_Line_Style (char *name) |
void | End_Line_Style_Search (void) |
void Begin_Line_Style_Search | ( | void | ) |
These routines recall all the defined line style names.
These routines are used to find all of the line style definitions that exist in the database. For example,
Begin_Line_Style_Search () while (Find_Line_Style (the_name)) Show_Line_Style(the_name, definition) End_Line_Style_Search ()
retrieves all the known names, in the style in which they were originally defined. If you need to know how many line style definitions will be returned (possibly for allocating a data structure to hold them) call Show_Line_Style_Count() after initiating the search.
Find_Line_Style() returns the names (one at a time). The function returns false when all line style names have been returned.
End_Line_Style_Search() terminates the process and frees any involved memory. This last step can be done any time after the initial call to Begin_Line_Style_Search().
If you want to examine the line style name definitions, call Show_Line_Style() on the results of Find_Line_Style() .
After calling Begin_Line_Style_Search() , if a line style becomes undefined (via UnDefine_Line_Style() ), subsequent calls to Find_Line_Style() will not return it. If a line style is redefined, the new definition will be returned. If a new line style is defined, it will not be returned in this search sequence.
Show_Line_Style_Count() is only valid between Begin_Line_Style_Search() and End_Line_Style_Search() . It will always return the total number of line styles defined as opposed to the remaining number of line style definitions.
Line_Style name searches can be nested. A user program can call Begin_Line_Style_Search() and look at the defined line style names without interfering with a line style name search that might already have been activated by another portion of the program. When End_Line_Style_Search() is called, the previously active line style name search (if any) becomes current.
void Show_Line_Style_Count | ( | int * | count | ) |
Finds out how many line styles will be returned. This is useful for determining the size of a data structure needed to store incoming items.
count | - The total number of line style names returned by Find_Line_Style() . Returned to user. Passed by reference always. |
No additional details. See Begin_Line_Style_Search()
HC_BOOLEAN Find_Line_Style | ( | char * | name | ) |
Retrieves the line style names, one at a time. The function returns false when all line styles have been returned.
name | - Simple name from the list of definitions. Returned to user. Passed by reference always. |
No additional details. See Begin_Line_Style_Search()
void End_Line_Style_Search | ( | void | ) |
Terminates the line style search sequence and frees any involved memory.
No additional details. See Begin_Line_Style_Search()