Top Up Prev Next Bottom Contents Index Search

18.5 Other CGCStar members

Class CGCStar is derived from CGStar class. It has a constructor with no argument. CGCTarget class is a friend class. It has a method to return the domain it lies in (domain) and a method for class identification (isA). In initialize method, we initialize referencedStates list. All other members described in this section are all protected.

CGCTarget* targ(); 
Returns the target pointer, type cast to CGCTarget.

StringList expandRef(const char* name); 
StringList expandRef(const char* name, const char* offset);
The above methods resolve macro $ref. The name argument is a state name or a porthole name. If it is a state name, we put the state in the referencedStates list. In the second method, the second argument is the offset of the first argument (state or porthole). It can be a numeral, an IntState name, or a string. If it is an IntState, the current value of the state is taken.

There are various ways to referring to a porthole. If the buffer size is 1, we use the buffer name or the pointer version depending on the type, EMBEDDED or OWNER. If the buffer size is larger than 1, we use direct addressing if static buffering is used. If static buffering can not be used, we use indirect addressing. The following method generates indirect addressing:

virtual StringList getActualRef(CGCPortHole* p, const char* ix); 
This method generates an indirect addressing for the argument porthole p with offset ix. If we may not use linear addressing, we generate modulo addressing, in which the index is modulo the buffer size.

virtual int amISpreadCollect(); 
Returns TRUE or FALSE, based on whether this star is a Spread or a Collect star or not. We need to take special care for Spread and Collect stars.

Top Up Prev Next Bottom Contents Index Search

Copyright © 1990-1997, University of California. All rights reserved.