next up previous contents
Next: The winfo_item Class Up: The name_stack Class Previous: name_stack Class Methods

name_stack Class Instantiation

Usually there is a single instance instance_name of class name_stack. It is used to maintain and construct the instance names during elaboration.

Example:

name_stack instance_name;  // instance_name.get_name()==""

instance_name.push("mylib"); // instance_name.get_name()=="mylib"
instance_name.push(":myent"); // instance_name.get_name()=="mylib:myent"
instance_name.push(":v1"); // instance_name.get_name()=="mylib:myent:v1"
instance_name.pop(); // instance_name.get_name()=="mylib:myent"
instance_name.push(":s"); // instance_name.get_name()=="mylib:myent:s"
instance_name.set(":t1"); // instance_name.get_name()=="mylib:myent:t1"
instance_name.set(":t2"); // instance_name.get_name()=="mylib:myent:t2"
instance_name.pop(); // instance_name.get_name()=="mylib:myent"




1998-11-17