Private operations

Private operations are tagged as static, which allows them to be accessed by other operations in the same file.

For example, the following declaration is generated in the forward declarations section of the implementation file for the Valve object if the close() operation is made private:


/* Forward declaration of protected methods */
/*## operation close() *\
static void close(Valve* const me);

The definition of the private operation is generated later in the same file, in the methods implementation section:


/* Methods implementation */
static void close(Valve* const me) {
   NOTIFY_OPERATION(me, &me, NULL, Valve, close, close(), 
      0, Default_Valve_close_SERIALIZE);
   /*#[ operation close() */
   /*#]*/
}

You can control the way names for private operations are generated using the C_CG::Operation::ProtectedName property. The default value of this property, $opName, uses the user‑assigned name for the private operation, such as myName().