2009-09-28 15:43:28 +00:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2006-02-10 19:11:12 +00:00
|
|
|
|
2009-09-28 15:43:28 +00:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2006-02-10 19:11:12 +00:00
|
|
|
|
2009-09-28 15:43:28 +00:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2006-02-10 19:11:12 +00:00
|
|
|
#ifndef cmListCommand_h
|
|
|
|
#define cmListCommand_h
|
|
|
|
|
|
|
|
#include "cmCommand.h"
|
|
|
|
|
|
|
|
/** \class cmListCommand
|
|
|
|
* \brief Common list operations
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
class cmListCommand : public cmCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* This is a virtual constructor for the command.
|
|
|
|
*/
|
2006-05-16 12:42:14 +00:00
|
|
|
virtual cmCommand* Clone()
|
2006-02-10 19:11:12 +00:00
|
|
|
{
|
|
|
|
return new cmListCommand;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This is called when the command is first encountered in
|
|
|
|
* the CMakeLists.txt file.
|
|
|
|
*/
|
2008-01-23 15:28:26 +00:00
|
|
|
virtual bool InitialPass(std::vector<std::string> const& args,
|
|
|
|
cmExecutionStatus &status);
|
2006-02-10 19:11:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This determines if the command is invoked when in script mode.
|
|
|
|
*/
|
2012-02-25 06:49:24 +00:00
|
|
|
virtual bool IsScriptable() const { return true; }
|
2006-02-10 19:11:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The name of the command as specified in CMakeList.txt.
|
|
|
|
*/
|
2012-02-25 06:49:24 +00:00
|
|
|
virtual const char* GetName() const { return "list";}
|
2006-02-10 19:11:12 +00:00
|
|
|
|
|
|
|
cmTypeMacro(cmListCommand, cmCommand);
|
|
|
|
protected:
|
|
|
|
bool HandleLengthCommand(std::vector<std::string> const& args);
|
|
|
|
bool HandleGetCommand(std::vector<std::string> const& args);
|
2006-05-15 13:25:06 +00:00
|
|
|
bool HandleAppendCommand(std::vector<std::string> const& args);
|
2007-08-15 14:26:50 +00:00
|
|
|
bool HandleFindCommand(std::vector<std::string> const& args);
|
2006-02-10 19:11:12 +00:00
|
|
|
bool HandleInsertCommand(std::vector<std::string> const& args);
|
2006-05-15 13:57:49 +00:00
|
|
|
bool HandleRemoveAtCommand(std::vector<std::string> const& args);
|
2006-02-10 19:11:12 +00:00
|
|
|
bool HandleRemoveItemCommand(std::vector<std::string> const& args);
|
2008-03-12 21:02:10 +00:00
|
|
|
bool HandleRemoveDuplicatesCommand(std::vector<std::string> const& args);
|
2006-08-22 14:16:46 +00:00
|
|
|
bool HandleSortCommand(std::vector<std::string> const& args);
|
|
|
|
bool HandleReverseCommand(std::vector<std::string> const& args);
|
2006-02-10 19:11:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
bool GetList(std::vector<std::string>& list, const char* var);
|
|
|
|
bool GetListString(std::string& listString, const char* var);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|