Subversion Repositories DevTools

Rev

Rev 2218 | Blame | Compare with Previous | Last modification | View Log | RSS feed

//## begin module%1.7%.codegen_version preserve=yes
//   Read the documentation to learn more about C++ code generator
//   versioning.
//## end module%1.7%.codegen_version

//## begin module%420310A60071.cm preserve=no
//## end module%420310A60071.cm

//## begin module%420310A60071.cp preserve=no
//      C O P Y R I G H T   N O T I C E
//      This material is confidential to ERG and may not be disclosed in whole
//      or in part to any third party nor used in any manner whatsoever other
//      than for the purposes expressly consented to by ERG in writing.
//
//      This material is also copyright and may not be reproduced, stored in a
//      retrieval system or transmitted in any form or by any means in whole or
//      in part without the express written consent of ERG.
//## end module%420310A60071.cp

//## Module: Iteration%420310A60071; Pseudo Package specification
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
//## Source file: Z:\MASS_Dev\Tools\TxnTestManager\src\Iteration.h

#ifndef Iteration_h
#define Iteration_h 1

//## begin module%420310A60071.additionalIncludes preserve=no
//## end module%420310A60071.additionalIncludes

//## begin module%420310A60071.includes preserve=yes
//## end module%420310A60071.includes


class EvaluationContext;
class TransactionStream;
class TestScenario;
namespace XMLSchema {
class IXmlSchemaWrapperSchema;
class IXmlSchemaWrapperFactory;

} // namespace XMLSchema

//## begin module%420310A60071.additionalDeclarations preserve=yes
#include <map>
#include <string>
#include <vector>
//## end module%420310A60071.additionalDeclarations


//## begin Iteration%420310A60071.preface preserve=yes
//## end Iteration%420310A60071.preface

//## Class: Iteration%420310A60071; private
//      An iteration.
//## Category: TransactionTestManager::Transaction Generation%4202F8EE0128
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
//## Persistence: Transient
//## Cardinality/Multiplicity: n



//## Uses: <unnamed>%42081A2300E3;TransactionStream { -> F}
//## Uses: <unnamed>%4208BF50034A;XMLSchema::IXmlSchemaWrapperString { -> }
//## Uses: <unnamed>%421173520074;EvaluationContext { -> F}

class Iteration 
{
  //## begin Iteration%420310A60071.initialDeclarations preserve=yes
  //## end Iteration%420310A60071.initialDeclarations

  public:
    //## Constructors (specified)
      //## Operation: Iteration%420311980081
      //        The only constructor.
      Iteration (const std::string &projectCode,        // The project code to which this iteration belongs.
      const int &iteration,     // The numeric identifier of this iteration.
      XMLSchema::IXmlSchemaWrapperFactory &factory,     // The factory.  While we do not accept ownership over this instance, we do
        // assume its validity for the remainder of our lifetime.
      XMLSchema::IXmlSchemaWrapperSchema &schema,       // The schema.  While we do not accept ownership over this instance, we do
        // assume its validity for the remainder of our lifetime.
      const std::string &schemaHandle   // The handle to the schema that we are using in this iteration.
      );

    //## Destructor (generated)
      virtual ~Iteration();


    //## Other Operations (specified)
      //## Operation: findTestScenario%428D756A034D
      //        Evaluate to the given test scenario.  When the test scenario doesn't exist,
      //        raise an exception.
      TestScenario& findTestScenario (const int &scenario       // The identity of the test scenario.
      );

      //## Operation: generate%42045A4D0198
      //        Generate the transactions for the scenarios defined for this iteration and
      //        evaluate to true, or to false when any transaction cannot be generated.
      const bool generate (TransactionStream& stream,   // The stream into which to generate.
      const bool &generateHeaders,      // When true, the transaction stream contains transaction header.  Otherwise,
        // the transaction steam does not contain transaction headers.
      EvaluationContext& evaluationContext      // The evaluation context.
      );

      //## Operation: getFormatVersion%4208BDE6025B
      //        Evaluate to the format version of the schema for this iteration.
      const int getFormatVersion () const;

      //## Operation: getIterationId%4203119303AD
      //        Evaluate to the identifier of this iteration.
      const int & getIterationId () const;

      //## Operation: getProjectCode%4203118E02F2
      //        Evaluate to the project code of this iteration.
      const std::string & getProjectCode () const;

      //## Operation: getSchema%420460A8000E
      //        Evaluate to the schema.
      XMLSchema::IXmlSchemaWrapperSchema & getSchema () const;

      //## Operation: getSchemaWrapperFactory%42045F8B030B
      //        Evaluate to the factory.
      XMLSchema::IXmlSchemaWrapperFactory & getSchemaWrapperFactory () const;

      //## Operation: getTestScenario%420312AF031E
      //        Evaluate to the given test scenario.  When the test scenario doesn't already
      //        exist, create it.
      TestScenario& getTestScenario (const int &scenario        // The identity of the test scenario.
      );

      //## Operation: getTransactionCount%420890E2017C
      //        Evaluate to the number of transactions in this iteration.
      const unsigned getTransactionCount () const;

    // Additional Public Declarations
      //## begin Iteration%420310A60071.public preserve=yes
      //## end Iteration%420310A60071.public

  protected:
    // Additional Protected Declarations
      //## begin Iteration%420310A60071.protected preserve=yes
      //## end Iteration%420310A60071.protected

  private:
    //## Constructors (generated)
      Iteration();

      Iteration(const Iteration &right);

    //## Assignment Operation (generated)
      Iteration & operator=(const Iteration &right);

    // Data Members for Class Attributes

      //## Attribute: iteration%4203121C0255
      //        The numeric identifier of this iteration.
      //## begin Iteration::iteration%4203121C0255.attr preserve=no  private: int {VAC} 
      const int m_iteration;
      //## end Iteration::iteration%4203121C0255.attr

      //## Attribute: projectCode%4203121B0284
      //        The project code to which this iteration belongs.
      //## begin Iteration::projectCode%4203121B0284.attr preserve=no  private: std::string {VAC} 
      const std::string m_projectCode;
      //## end Iteration::projectCode%4203121B0284.attr

      //## Attribute: schemaHandle%42045F8E01A4
      //        The handle to the schema that we are using in this iteration.
      //## begin Iteration::schemaHandle%42045F8E01A4.attr preserve=no  private: std::string {VA} schemaHandle
      std::string m_schemaHandle;
      //## end Iteration::schemaHandle%42045F8E01A4.attr

    // Data Members for Associations

      //## Association: TransactionTestManager::Transaction Generation::<unnamed>%4203130E01B6
      //## Role: Iteration::scenario%4203130E038B
      //        The collection of scenarios that have been defined for this iteration.
      //## Qualifier: scenario%4203132A033D; int
      //        The scenario.
      //## begin Iteration::scenario%4203130E038B.role preserve=no  private: TestScenario {1 -> 1RFHgAN}
      std::map<int, TestScenario *> m_scenario;
      //## end Iteration::scenario%4203130E038B.role

      //## Association: TransactionTestManager::Transaction Generation::<unnamed>%42044D9D008F
      //## Role: Iteration::schema%42044D9D037D
      //        The schema.  While we do not accept ownership over this instance, we do
      //        assume its validity for the remainder of our lifetime.
      //## begin Iteration::schema%42044D9D037D.role preserve=no  private: XMLSchema::IXmlSchemaWrapperSchema {1 -> 1RFHAN}
      XMLSchema::IXmlSchemaWrapperSchema *m_schema;
      //## end Iteration::schema%42044D9D037D.role

      //## Association: TransactionTestManager::Transaction Generation::<unnamed>%4204658D0094
      //## Role: Iteration::factory%4204658E0065
      //        The factory.  While we do not accept ownership over this instance, we do
      //        assume its validity for the remainder of our lifetime.
      //## begin Iteration::factory%4204658E0065.role preserve=no  private: XMLSchema::IXmlSchemaWrapperFactory {1 -> 1RFHAN}
      XMLSchema::IXmlSchemaWrapperFactory *m_factory;
      //## end Iteration::factory%4204658E0065.role

      //## Association: TransactionTestManager::Transaction Generation::<unnamed>%42070E4700D3
      //## Role: Iteration::orderedScenarioCollection%42070E47024A
      //        The collection of scenarios in generation order.
      //## begin Iteration::orderedScenarioCollection%42070E47024A.role preserve=no  private: TestScenario {1 -> *RFHAN}
      std::vector< TestScenario * > m_orderedScenarioCollection;
      //## end Iteration::orderedScenarioCollection%42070E47024A.role

    // Additional Private Declarations
      //## begin Iteration%420310A60071.private preserve=yes
      //## end Iteration%420310A60071.private

  private: //## implementation
    // Additional Implementation Declarations
      //## begin Iteration%420310A60071.implementation preserve=yes
      //## end Iteration%420310A60071.implementation

};

//## begin Iteration%420310A60071.postscript preserve=yes
//## end Iteration%420310A60071.postscript

// Class Iteration 

//## begin module%420310A60071.epilog preserve=yes
//## end module%420310A60071.epilog


#endif