lab2part1 - | Concrete Template...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
// /*-------------------------------------------------------------------*\ // | Concrete Template : Statement_Pretty_Print_1 // \*-------------------------------------------------------------------*/ #ifndef CT_STATEMENT_PRETTY_PRINT_1 #define CT_STATEMENT_PRETTY_PRINT_1 1 ///------------------------------------------------------------------------ /// Global Context -------------------------------------------------------- ///------------------------------------------------------------------------ #include "AT/Statement/Pretty_Print.h" /*! #include "AT/Statement/Kernel.h" !*/ ///------------------------------------------------------------------------ /// Interface ------------------------------------------------------------- ///------------------------------------------------------------------------ concrete_template < concrete_instance class Statement_Base /*! implements abstract_instance Statement_Kernel <Statement_Base> !*/ > class Statement_Pretty_Print_1 : implements abstract_instance Statement_Pretty_Print <Statement_Base>, extends concrete_instance Statement_Base { private: local_procedure_body Pretty_Print_Condition ( alters Character_OStream& out, preserves Integer condition ) /*! preserves self requires out.is_open = true and condition is in Condition ensures out.is_open = true and out.ext_name = #out.ext_name and out.content = #out.content * DISPLAY_CONDITION (condition) !*/ { // Students to fill this in //selects the case based on the condition and prints that name case_select (condition) { case NEXT_IS_EMPTY: { out << "next-is-empty"; }break; case NEXT_IS_NOT_EMPTY: { out << "next-is-not-empty"; }break; case NEXT_IS_WALL:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
{ out << "next-is-wall"; }break;
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

lab2part1 - | Concrete Template...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online