<commit_before>//
// This example shows how to add an observer to a C++ program
//

// first include the required header files for the vtk classes we are using
#include "vtkConeSource.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderWindow.h"
#include "vtkCommand.h"

class myCallback : public vtkCommand
{
  static myCallback *New() {
    return new myCallback; }
  virtual void Execute(vtkObject *caller, unsigned long, void *callData)
    {
    cerr << "Starting to Render\n";
    }
};

int main( int argc, char *argv[] )
{
  //
  // The pipeline creation is documented in Step1
  //
  vtkConeSource *cone = vtkConeSource::New();
  cone->SetHeight( 3.0 );
  cone->SetRadius( 1.0 );
  cone->SetResolution( 10 );

  vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
  coneMapper->SetInput( cone->GetOutput() );
  vtkActor *coneActor = vtkActor::New();
  coneActor->SetMapper( coneMapper );

  vtkRenderer *ren1= vtkRenderer::New();
  ren1->AddActor( coneActor );
  ren1->SetBackground( 0.1, 0.2, 0.4 );

  vtkRenderWindow *renWin = vtkRenderWindow::New();
  renWin->AddRenderer( ren1 );
  renWin->SetSize( 300, 300 );

  // Here is where we setup the observer, we do a new and ren1 will
  // eventually free the observer
  myCallback *mo1 = myCallback::New();
  ren1->AddObserver(vtkCommand::StartEvent,mo1);
  myCallback->Delete();
  
  //
  // now we loop over 360 degreeees and render the cone each time
  //
  int i;
  for (i = 0; i < 360; ++i)
    {
    // render the image
    renWin->Render();
    // rotate the active camera by one degree
    ren1->GetActiveCamera()->Azimuth( 1 );
    }
  
  //<commit_msg>command updates<commit_after>//
// This example shows how to add an observer to a C++ program
//

// first include the required header files for the vtk classes we are using
#include "vtkConeSource.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderWindow.h"
#include "vtkCommand.h"

class myCallback : public vtkCommand
{
public:
  static myCallback *New() {
    return new myCallback; }
  virtual void Execute(vtkObject *caller, unsigned long, void *callData)
    {
    cerr << "Starting to Render\n";
    }
};

int main( int argc, char *argv[] )
{
  //
  // The pipeline creation is documented in Step1
  //
  vtkConeSource *cone = vtkConeSource::New();
  cone->SetHeight( 3.0 );
  cone->SetRadius( 1.0 );
  cone->SetResolution( 10 );

  vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
  coneMapper->SetInput( cone->GetOutput() );
  vtkActor *coneActor = vtkActor::New();
  coneActor->SetMapper( coneMapper );

  vtkRenderer *ren1= vtkRenderer::New();
  ren1->AddActor( coneActor );
  ren1->SetBackground( 0.1, 0.2, 0.4 );

  vtkRenderWindow *renWin = vtkRenderWindow::New();
  renWin->AddRenderer( ren1 );
  renWin->SetSize( 300, 300 );

  // Here is where we setup the observer, we do a new and ren1 will
  // eventually free the observer
  myCallback *mo1 = myCallback::New();
  ren1->AddObserver(vtkCommand::StartEvent,mo1);
  mo1->Delete();
  
  //
  // now we loop over 360 degreeees and render the cone each time
  //
  int i;
  for (i = 0; i < 360; ++i)
    {
    // render the image
    renWin->Render();
    // rotate the active camera by one degree
    ren1->GetActiveCamera()->Azimuth( 1 );
    }
  
  //
{'fraction_non_alphanumeric': 0.13531758208039277, 'fraction_numerical': 0.0223995090518564, 'mean_word_length': 3.3758389261744965, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4135809', 'n_tokens_mistral': 1151, 'n_tokens_neox': 1090, 'n_words': 324}