convert one more factory template
This commit is contained in:
@ -57,6 +57,15 @@ using namespace LAMMPS_NS;
|
||||
#define DELTALINE 256
|
||||
#define DELTA 4
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
one instance per command in style_command.h
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
template <typename T> static Command *command_creator(LAMMPS *lmp)
|
||||
{
|
||||
return new T(lmp);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/** \class LAMMPS_NS::Input
|
||||
@ -810,16 +819,6 @@ int Input::execute_command()
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
one instance per command in style_command.h
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
template <typename T>
|
||||
Command *Input::command_creator(LAMMPS *lmp)
|
||||
{
|
||||
return new T(lmp);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -64,9 +64,6 @@ class Input : protected Pointers {
|
||||
typedef std::map<std::string, CommandCreator> CommandCreatorMap;
|
||||
CommandCreatorMap *command_map;
|
||||
|
||||
protected:
|
||||
template <typename T> static Command *command_creator(LAMMPS *);
|
||||
|
||||
private:
|
||||
void parse(); // parse an input text line
|
||||
char *nextword(char *, char **); // find next word in string with quotes
|
||||
|
||||
Reference in New Issue
Block a user