<commit_before>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkFEMLoadTest.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Insight Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

#ifndef __itkFEMLoadTest_h
#define __itkFEMLoadTest_h

#include "itkFEMLoadElementBase.h"

namespace itk {
namespace fem {




/**
 * \class LoadTest
 * \brief Example to show how to define templated load classes.
 *
 * \note The class must be instantiated, before the object factory can
 *       produce more objects of this class. Instantiate the specific
 *       derived classes with: "template class LoadTest<...>;" where required.
 */
template<class TClass>
class LoadTest : public LoadElement
{
FEM_CLASS(LoadTest,LoadElement)
public:

  /**
   * Default constructor
   */
  LoadTest() {}

  /**
   * Some data that this load defines.
   */
  TClass data;

  virtual void Read( std::istream& f, void* info )
  {
    Superclass::Read(f,info);
  }
  void Write( std::ostream& f, int clid ) const
  {
    // if not set already, se set the clid
    if (clid<0) clid=CLID;

    // call the parent's write function
    Superclass::Write(f,clid);
  }

  /**
   * Function required by FEMObjectFactory to create objects.
   */
  static Baseclass* New(void)
  { return new LoadTest; }

};

// Register the class with ObjectFactory and initialize the CLID
// We also try to compose a nice name for each class. In case
// there are many templates, you may want to use just
// "typeid(LoadTest<TClass>).name()" instead.
template<class TClass>
const int LoadTest<TClass>::CLID=FEMOF::Register( LoadTest::New, (std::string("LoadTest(")+typeid(TClass).name()+")").c_str() );

<commit_msg>FIX: Renamed the object construction function.<commit_after>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkFEMLoadTest.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Insight Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

#ifndef __itkFEMLoadTest_h
#define __itkFEMLoadTest_h

#include "itkFEMLoadElementBase.h"

namespace itk {
namespace fem {




/**
 * \class LoadTest
 * \brief Example to show how to define templated load classes.
 *
 * \note The class must be instantiated, before the object factory can
 *       produce more objects of this class. Instantiate the specific
 *       derived classes with: "template class LoadTest<...>;" where required.
 */
template<class TClass>
class LoadTest : public LoadElement
{
FEM_CLASS(LoadTest,LoadElement)
public:

  /**
   * Default constructor
   */
  LoadTest() {}

  /**
   * Some data that this load defines.
   */
  TClass data;

  virtual void Read( std::istream& f, void* info )
  {
    Superclass::Read(f,info);
  }
  void Write( std::ostream& f, int clid ) const
  {
    // if not set already, se set the clid
    if (clid<0) clid=CLID;

    // call the parent's write function
    Superclass::Write(f,clid);
  }

  /**
   * Function required by FEMObjectFactory to create objects.
   */
  static Baseclass* NewLoadTest(void)
  { return new LoadTest; }

};

// Register the class with ObjectFactory and initialize the CLID
// We also try to compose a nice name for each class. In case
// there are many templates, you may want to use just
// "typeid(LoadTest<TClass>).name()" instead.
template<class TClass>
const int LoadTest<TClass>::CLID=FEMOF::Register( LoadTest::NewLoadTest, (std::string("LoadTest(")+typeid(TClass).name()+")").c_str() );


{'fraction_non_alphanumeric': 0.1640248104755341, 'fraction_numerical': 0.002297266253158741, 'mean_word_length': 3.7898789878987897, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '344943', 'n_tokens_mistral': 1296, 'n_tokens_neox': 1228, 'n_words': 427}