All Frameworks Class Hierarchy This Framework Previous Next Indexes
SPAlaw Class unary_data_law
SPAbase.ACIS_OBJECT
|
+---SPAlaw.law
|
+---unary_data_law
Usage: you can derive this class.
public class unary_data_law
Provides methods and data for laws that have one law data member.
Role: This law has one law data argument, such as a curve_law, wire_law,
or surface_law. It is parsed with one law tag. [For example, "CUR(EDGE1)"
is followed by an edge, which is the law data.] It permits an application
to pass an ACIS entity or other class in the form of a law_data class into laws.
Applications should call the virtual remove method instead of the tilde (~)
destructor to get rid of a law. This method decrements the use_count, and
calls the law destructor if use_count falls to zero. The destructors of laws
containing sublaws should call remove on the latter for correct memory management.
- See also:
- law_data
Constructor and Destructor Index
- o
unary_data_law(law_data*)
- Constructs a unary_data_law.
- o
~unary_data_law()
-
Method Index
- o
fsub()
- This returns the sublaw that is passed into this law.
- o
id()
- Returns a unique ID that may be used to identify a law's class type.
- o
make_one(law_data*)
- Returns a pointer to a law of this type.
Data Member Index
- o
data
- This is a pointer to the data structure used as input to the unary data law.
Constructor and Destructor
o unary_data_law
public unary_data_law( | law_data* | in_sub_law | = NULL) |
-
Constructs a unary_data_law.
Role: This has a pointer to a sublaw data class passed in as one of
its arguments.
- Parameters:
-
- in_sub_law
- pointer to law data.
o ~unary_data_law
protected virtual ~unary_data_law( | ) |
-
Methods
o fsub
-
This returns the sublaw that is passed into this law.
Role: Only applications that create new laws that have parts of old
laws should use this method. An example of this is the simplifier; the law
"abs(x^2)" simplifies to "x^2", where "x^2" is the part of the old law used
in the new law. If the sublaw is to be used elsewhere, the add method should called.
o id
-
Returns a unique ID that may be used to identify a law's class type.
Role: This method should not be called directly by the application.
All derived law classes must have this method. The isa, id, and type
methods are used to identify a law's class type.
o make_one
-
Returns a pointer to a law of this type.
Role: Used by parsing to create an instance of this law.
All laws derived from unary_law have a make_one method. This is used by the
parser and simplifier and should not be called by the application directly.
- Parameters:
-
- in_data
- pointer to law data.
Data Members
o data
protected law_data* data
-
This is a pointer to the data structure used as input to the unary data law.
This object is included in the file: main_law.hxx