Colobot
|
Interface for objects that store CBOT programs. More...
#include <program_storage_object.h>
Public Member Functions | |
CProgramStorageObject (ObjectInterfaceTypes &types) | |
virtual bool | IntroduceVirus ()=0 |
virtual void | SetActiveVirus (bool bActive)=0 |
virtual bool | GetActiveVirus ()=0 |
Checks virus active status. More... | |
virtual bool | ReadProgram (Program *program, const std::string &filename)=0 |
Read program from a given file. More... | |
virtual bool | WriteProgram (Program *program, const std::string &filename)=0 |
Write program to a given file. More... | |
virtual bool | GetCompile (Program *program)=0 |
Check if program was compiled successfully. More... | |
virtual Program * | AddProgram ()=0 |
Add a new program. More... | |
virtual void | AddProgram (std::unique_ptr< Program > program)=0 |
Add given program to the program list stored in this robot. More... | |
virtual void | RemoveProgram (Program *program)=0 |
Remove program. More... | |
virtual Program * | CloneProgram (Program *program)=0 |
Clone a program. More... | |
virtual std::vector< std::unique_ptr< Program > > & | GetPrograms ()=0 |
Return a std::vector of all available programs. More... | |
virtual int | GetProgramCount ()=0 |
Return count of all programs. More... | |
virtual Program * | GetProgram (int index)=0 |
Return program with the given index. More... | |
virtual Program * | GetOrAddProgram (int index)=0 |
Return program at the given index (creating it and all previous ones as needed) More... | |
virtual int | GetProgramIndex (Program *program)=0 |
Return index in the list of given Program instance. More... | |
virtual void | SetProgramStorageIndex (int programStorageIndex)=0 |
Set index for use in filename for saved programs (-1 to disable) More... | |
virtual int | GetProgramStorageIndex ()=0 |
Return index that is used while saving programs. More... | |
virtual void | SaveAllUserPrograms (const std::string &userSource)=0 |
Save all user programs. More... | |
virtual void | LoadAllProgramsForLevel (CLevelParserLine *levelSource, const std::string &userSource, bool loadSoluce)=0 |
Load all programs when loading the level including previously saved user programs. More... | |
virtual void | SaveAllProgramsForSavedScene (CLevelParserLine *levelSourceLine, const std::string &levelSource)=0 |
Save all programs when saving the saved scene. More... | |
virtual void | LoadAllProgramsForSavedScene (CLevelParserLine *levelSourceLine, const std::string &levelSource)=0 |
Load all programs when loading the saved scene. More... | |
Interface for objects that store CBOT programs.
|
pure virtual |
Infects a random program of a robot with virus
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Sets the virus as active, this controls the "Program infected" message and is cleared after you edit the program. Note that this status is independent from the virus particles (see COldObject::SetVirusMode for that)
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Checks virus active status.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Read program from a given file.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Write program to a given file.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Check if program was compiled successfully.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Add a new program.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Add given program to the program list stored in this robot.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Remove program.
Implemented in CProgramStorageObjectImpl.
Clone a program.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Return a std::vector of all available programs.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Return count of all programs.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Return program with the given index.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Return program at the given index (creating it and all previous ones as needed)
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Return index in the list of given Program instance.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Set index for use in filename for saved programs (-1 to disable)
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Return index that is used while saving programs.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Save all user programs.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Load all programs when loading the level including previously saved user programs.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Save all programs when saving the saved scene.
Implemented in CProgramStorageObjectImpl.
|
pure virtual |
Load all programs when loading the saved scene.
Implemented in CProgramStorageObjectImpl.