2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2006-02-10 22:11:12 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2006-02-10 22:11:12 +03:00
|
|
|
|
2009-09-28 19:43:28 +04: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 22:11:12 +03: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 16:42:14 +04:00
|
|
|
virtual cmCommand* Clone()
|
2006-02-10 22:11:12 +03:00
|
|
|
{
|
|
|
|
return new cmListCommand;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This is called when the command is first encountered in
|
|
|
|
* the CMakeLists.txt file.
|
|
|
|
*/
|
2008-01-23 18:28:26 +03:00
|
|
|
virtual bool InitialPass(std::vector<std::string> const& args,
|
|
|
|
cmExecutionStatus &status);
|
2006-02-10 22:11:12 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This determines if the command is invoked when in script mode.
|
|
|
|
*/
|
2012-02-25 10:49:24 +04:00
|
|
|
virtual bool IsScriptable() const { return true; }
|
2006-02-10 22:11:12 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The name of the command as specified in CMakeList.txt.
|
|
|
|
*/
|
2014-02-25 05:19:17 +04:00
|
|
|
virtual std::string GetName() const { return "list";}
|
2006-02-10 22:11:12 +03:00
|
|
|
|
|
|
|
cmTypeMacro(cmListCommand, cmCommand);
|
|
|
|
protected:
|
|
|
|
bool HandleLengthCommand(std::vector<std::string> const& args);
|
|
|
|
bool HandleGetCommand(std::vector<std::string> const& args);
|
2006-05-15 17:25:06 +04:00
|
|
|
bool HandleAppendCommand(std::vector<std::string> const& args);
|
2007-08-15 18:26:50 +04:00
|
|
|
bool HandleFindCommand(std::vector<std::string> const& args);
|
2006-02-10 22:11:12 +03:00
|
|
|
bool HandleInsertCommand(std::vector<std::string> const& args);
|
2006-05-15 17:57:49 +04:00
|
|
|
bool HandleRemoveAtCommand(std::vector<std::string> const& args);
|
2006-02-10 22:11:12 +03:00
|
|
|
bool HandleRemoveItemCommand(std::vector<std::string> const& args);
|
2008-03-13 00:02:10 +03:00
|
|
|
bool HandleRemoveDuplicatesCommand(std::vector<std::string> const& args);
|
2006-08-22 18:16:46 +04:00
|
|
|
bool HandleSortCommand(std::vector<std::string> const& args);
|
|
|
|
bool HandleReverseCommand(std::vector<std::string> const& args);
|
2006-02-10 22:11:12 +03:00
|
|
|
|
|
|
|
|
2014-02-05 01:06:56 +04:00
|
|
|
bool GetList(std::vector<std::string>& list, const std::string& var);
|
|
|
|
bool GetListString(std::string& listString, const std::string& var);
|
2006-02-10 22:11:12 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|