// 
// File name: Pattern.h
//
// Discription: Описание класса Выборка
//
// Programmer: Vladimir P. Stasevich (SV)
//
// History: 
//    Created 24.02.2000 (SV)
//

#ifndef PATTERN_H
#define PATTERN_H

#include <list>
#pragma hdrstop

#include "Force.h"
#include "RecognitionNet.h"

using namespace std;

struct TPatternElem
{
   TSituation situation;
   TForces    forces;
};

class TLearnPattern : list<TPatternElem>
{
   protected:
      char name[MAXPATH];
   
//      list<TPatternElem> elems;

      iterator iter;
   
   public:
      TLearnPattern() 
      { *name = '\0'; };

      char* GetName()
         { return name; };

      void CreateNewPattern( void );
      void DestroyPattern( void );
      int  LoadPattern( const char* fileName );
      int  SavePattern( const char* fileName );

      int GetFirst( TPatternElem *elem );
      int GetNext ( TPatternElem *elem );

      void Insert( const TPatternElem& elem );

      void Generate( int numbElem );
};

extern TLearnPattern pattern;

#endif

