Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Examples

DummyAgent Class Reference

SCR Agent for testing. More...

#include <DummyAgent.h>

Inheritance diagram for DummyAgent:

SCRAgent List of all members.

Public Member Functions

 DummyAgent ()
YCPValue Read (const YCPPath &path, const YCPValue &arg=YCPNull(), const YCPValue &opt=YCPNull())
YCPBoolean Write (const YCPPath &path, const YCPValue &value, const YCPValue &arg=YCPNull())
YCPValue Execute (const YCPPath &path, const YCPValue &value, const YCPValue &arg=YCPNull())
YCPList Dir (const YCPPath &path)
YCPValue otherCommand (const YCPTerm &term)

Private Member Functions

YCPValue checkPath (const YCPPath &path, const YCPMap &map, const YCPValue &defaultVal)

Private Attributes

YCPList readList
YCPList writeList
YCPList execList
YCPValue defaultValue
YCPMap defaultMap
int readCalls
int writeCalls
int execCalls

Detailed Description

SCR Agent for testing.


Constructor & Destructor Documentation

DummyAgent::DummyAgent  ) 
 

Constructor


Member Function Documentation

YCPValue DummyAgent::checkPath const YCPPath path,
const YCPMap map,
const YCPValue defaultVal
[private]
 

Check if the given path is valid and return the correct value

YCPList DummyAgent::Dir const YCPPath path  )  [virtual]
 

Get a list of all subtrees.

Implements SCRAgent.

YCPValue DummyAgent::Execute const YCPPath path,
const YCPValue value,
const YCPValue arg = YCPNull()
[virtual]
 

Execute a program. Destroy the result after use.

Returns:
Value defined in DataMap command. If no value is defined in DataMap, YCPBoolean(0) is returned.

Reimplemented from SCRAgent.

YCPValue DummyAgent::otherCommand const YCPTerm term  )  [virtual]
 

Evaluates the DataMap() command

Reimplemented from SCRAgent.

YCPValue DummyAgent::Read const YCPPath path,
const YCPValue arg = YCPNull(),
const YCPValue opt = YCPNull()
[virtual]
 

Reads data. Destroy the result after use.

Parameters:
path Specifies what part of the subtree should be read. The path is specified _relatively_ to Root()!

Implements SCRAgent.

YCPBoolean DummyAgent::Write const YCPPath path,
const YCPValue value,
const YCPValue arg = YCPNull()
[virtual]
 

Writes data. Destroy the result after use.

Returns:
Value defined in DataMap command. If no value is defined in DataMap, YCPBoolean(true) is returned.

Implements SCRAgent.


Member Data Documentation

YCPMap DummyAgent::defaultMap [private]
 

YCPValue DummyAgent::defaultValue [private]
 

default value if path has no match in dataMap

int DummyAgent::execCalls [private]
 

YCPList DummyAgent::execList [private]
 

int DummyAgent::readCalls [private]
 

counts of previously done operations

YCPList DummyAgent::readList [private]
 

data map from agent initialization

int DummyAgent::writeCalls [private]
 

YCPList DummyAgent::writeList [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 18:15:24 2007 for yast2-core by doxygen 1.3.6