Loading...
Searching...
No Matches
CProgrammableObjectImpl Class Reference
Inheritance diagram for CProgrammableObjectImpl:
[legend]

## Public Member Functions

| CProgrammableObjectImpl (ObjectInterfaceTypes &types, CObject *object)
bool | EventProcess (const Event &event)
bool | IsProgram () override
| Check if a program is running.
void | RunProgram (Program *program) override
| Start a program.
Program * | GetCurrentProgram () override
| Returns the currently running program, or nullptr if no program is running.
void | StopProgram () override
| Stop currently running program.
bool | ReadStack (std::istream &istr) override
| Read current execution status from file.
bool | WriteStack (std::ostream &ostr) override
| Save current execution status to file.
void | TraceRecordStart () override
| Start recording trace.
void | TraceRecordStop () override
| Stop recording trace and generate CBot program.
bool | IsTraceRecord () override
| Returns true if trace recording is in progress.
void | SetActivity (bool activity) override
| Management of object "activity" (temporairly stops program execution, right now used only by Aliens in eggs).
bool | GetActivity () override
void | SetCmdLine (unsigned int rank, float value)
float | GetCmdLine (unsigned int rank) override
| Returns program cmdline values for an object.
std::vector< float > & | GetCmdLine ()
Public Member Functions inherited from CProgrammableObject
| CProgrammableObject (ObjectInterfaceTypes &types)

## Member Function Documentation

## IsProgram()

bool CProgrammableObjectImpl::IsProgram | ( |  | ) |

override virtual

Check if a program is running.

Implements CProgrammableObject.

## RunProgram()

void CProgrammableObjectImpl::RunProgram | ( | Program * | program | ) |

override virtual

Start a program.

Implements CProgrammableObject.

## GetCurrentProgram()

Program * CProgrammableObjectImpl::GetCurrentProgram | ( |  | ) |

override virtual

Returns the currently running program, or nullptr if no program is running.

Implements CProgrammableObject.

## StopProgram()

void CProgrammableObjectImpl::StopProgram | ( |  | ) |

override virtual

Stop currently running program.

Implements CProgrammableObject.

## ReadStack()

bool CProgrammableObjectImpl::ReadStack | ( | std::istream & | istr | ) |

override virtual

Read current execution status from file.

Implements CProgrammableObject.

## WriteStack()

bool CProgrammableObjectImpl::WriteStack | ( | std::ostream & | ostr | ) |

override virtual

Save current execution status to file.

Implements CProgrammableObject.

## TraceRecordStart()

void CProgrammableObjectImpl::TraceRecordStart | ( |  | ) |

override virtual

Start recording trace.

Implements CProgrammableObject.

## TraceRecordStop()

void CProgrammableObjectImpl::TraceRecordStop | ( |  | ) |

override virtual

Stop recording trace and generate CBot program.

Implements CProgrammableObject.

## IsTraceRecord()

bool CProgrammableObjectImpl::IsTraceRecord | ( |  | ) |

override virtual

Returns true if trace recording is in progress.

Implements CProgrammableObject.

## SetActivity()

void CProgrammableObjectImpl::SetActivity | ( | bool | bMode | ) |

override virtual

Management of object "activity" (temporairly stops program execution, right now used only by Aliens in eggs).

Implements CProgrammableObject.

## GetActivity()

bool CProgrammableObjectImpl::GetActivity | ( |  | ) |

override virtual

Implements CProgrammableObject.

## GetCmdLine()

float CProgrammableObjectImpl::GetCmdLine | ( | unsigned int | rank | ) |

override virtual

Returns program cmdline values for an object.

Implements CProgrammableObject.

The documentation for this class was generated from the following files:

- src/object/implementation/programmable_impl.h
- src/object/implementation/programmable_impl.cpp