Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 "Create Impl." on meth. w/o ";" copies whole class
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

drzoom
Ketchup Master

Switzerland
57 Posts

Posted - Jul 04 2006 :  07:14:22 AM  Show Profile  Reply with Quote
I use:
VA_X.dll file version 10.3.1526.0 built 2006.06.28

In this situation:

Slot.h:

#pragma once
#ifndef FITTING_ENVIRONMENTMANAGER_SLOT_H
#define FITTING_ENVIRONMENTMANAGER_SLOT_H

template<class T>
class FitSideData
{
};

namespace fitting {
namespace environmentmanager {

namespace alscombination {
  class Info {};
}

/**
 * Represents a simple slot for two sides.
 */
class Slot : public FitSideData<alscombination::Info>
{
public:
  /**
   * ctor
   */
  Slot();

  /**
   * ctor
   */
  Slot( const alscombination::Info& rightALS,
    const alscombination::Info& leftALS);

  /**
   * dtor
   */
  virtual ~Slot();

public:
  /**
   * Check if both ALS combinations ids are equal.
   *
   * \\return true If both sides have the same ALS combination id.
   */
  bool IsALSCombinationIdConsistent() const
};


}
}


#endif


and...


#include "StdAfx.h"
#include "Slot.h"

namespace fitting {
namespace environmentmanager {

Slot::Slot()
  : FitSideData<alscombination::Info>()
{
}

Slot::Slot( const alscombination::Info& rightALSInfo,
  const alscombination::Info& leftALSInfo )
: FitSideData<alscombination::Info>( leftALSInfo, rightALSInfo )
{
}

Slot::~Slot()
{
}

}
}





1. If I use the refactor method "Create Implementation" on the new method IsALSCombinationIdConsistent, I get this code in the implementation File:


class Slot :  FitSideData<alscombination::Info> { : /**  * ctor  */
 fitting::environmentmanager::Slot::IsALSCombinationIdConsistent()
 /**  * ctor  */ Slot( const alscombination::Info& rightALS,
const alscombination::Info& leftALS)
{

}


Note the missing semicolon at the end of the new method declaration.




2. If I add the semicolon and call "Create Implementation" I get a correct implementation:


bool fitting::environmentmanager::Slot::IsALSCombinationIdConsistent() const
{

}


But outside of the namespace brackets.

Feature Request: An option to choose between placing implementation methods in namespace brackets or as standalone implementation blocks.

Possible you can look, if there already other implemented method and place the new method in the same namespace bracket. If no implemented method in a namespace bracket exists, create a new one and place the method in it.

best regards
Tobias



best regards
Tobias

Edited by - drzoom on Jul 04 2006 07:16:13 AM

jpizzi
Tomato Guru

USA
642 Posts

Posted - Jul 04 2006 :  11:40:23 PM  Show Profile  Reply with Quote
Confirmed. Thanks for the detailed reproducible example.

case=1567

Joe Pizzi
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000