Functions | |
HC_KEY | Create_Segment (const char *segment) |
Brings a segment into existence without opening it. More... | |
HC_KEY | Create_Segment_Key_By_Key (HC_KEY parent_segment, char const *child_segment_name) |
Similar to Create_Segment(), but inserts a new segment into the segment associated with the passed key. More... | |
Detailed Description
Function Documentation
◆ Create_Segment()
HC_KEY Create_Segment | ( | const char * | segment | ) |
Brings a segment into existence without opening it.
- Parameters
-
segment - Name of the segment.
- Returns
- The key to the created segment.
DETAILS
Open_Segment() is the normal method for bringing segments into existence—it both creates the segment (if it does not already exist) and readies it to receive geometry, subsegments, etc.
Once in a while, you need to create a segment in advance of being ready to insert information into it. Include_Segment() and Style_Segment() , for example, require that the specified segment exist at the time of the call. Create_Segment() is an easy way to make the segment exist even if you're not ready to put something into it.
Create_Segment() is provided as a utility routine. It is absolutely identical to an Open_Segment() followed immediately by a Close_Segment() . You can open the segment again later, by name of course. Or if it's more convenient, by the key returned from Create_Segment() .
NOTES
RESTRICTIONS
◆ Create_Segment_Key_By_Key()
HC_KEY Create_Segment_Key_By_Key | ( | HC_KEY | parent_segment, |
char const * | child_segment_name | ||
) |
Similar to Create_Segment(), but inserts a new segment into the segment associated with the passed key.
- Parameters
-
parent_segment - Unique numeric identifier to the segment in which to insert the new segment. child_segment_name - The name of the new segment to be created.
- Returns
- The key to the created segment.
DETAILS
No additional details. See Create_Segment().