yast2-core
Public Member Functions | Private Attributes | List of all members
Y2StdioFunction Class Reference

#include <Y2StdioFunction.h>

Inheritance diagram for Y2StdioFunction:
Y2Function

Public Member Functions

 Y2StdioFunction (string ns, string name, constFunctionTypePtr type, Y2ProgramComponent *sender)
 
virtual ~Y2StdioFunction ()
 
virtual bool attachParameter (const YCPValue &arg, const int position)
 
virtual constTypePtr wantedParameterType () const
 
virtual bool appendParameter (const YCPValue &arg)
 
virtual bool finishParameters ()
 
virtual YCPValue evaluateCall ()
 
virtual bool reset ()
 
virtual string name () const
 
- Public Member Functions inherited from Y2Function
virtual ~Y2Function ()
 

Private Attributes

string m_namespace
 
string m_name
 
constFunctionTypePtr m_type
 
vector< YCPValuem_parameters
 
Y2ProgramComponentm_sender
 

Constructor & Destructor Documentation

Y2StdioFunction::Y2StdioFunction ( string  ns,
string  name,
constFunctionTypePtr  type,
Y2ProgramComponent sender 
)

References m_parameters.

Y2StdioFunction::~Y2StdioFunction ( )
virtual

Member Function Documentation

bool Y2StdioFunction::appendParameter ( const YCPValue arg)
virtual

Appends a parameter to the call.

Returns
false if there was a type mismatch

Implements Y2Function.

References YCPElement::isNull(), m_name, m_namespace, m_parameters, and ycp2error.

bool Y2StdioFunction::attachParameter ( const YCPValue arg,
const int  position 
)
virtual

Attaches a parameter to a given position to the call.

Returns
false if there was a type mismatch

Implements Y2Function.

References m_parameters.

YCPValue Y2StdioFunction::evaluateCall ( )
virtual
bool Y2StdioFunction::finishParameters ( )
virtual

Signal that we're done adding parameters.

Returns
false if there was a parameter missing

Implements Y2Function.

string Y2StdioFunction::name ( ) const
virtual

Implements Y2Function.

References m_name.

bool Y2StdioFunction::reset ( )
virtual

Reset the currecn parameters, so the instance can be reused for the next call (appendParameter etc)

Implements Y2Function.

References m_parameters.

constTypePtr Y2StdioFunction::wantedParameterType ( ) const
virtual

What type is expected for the next appendParameter (val) ? (Used when calling from Perl, to be able to convert from the simple type system of Perl to the elaborate type system of YCP)

Returns
Type::Any if number of parameters exceeded

Implements Y2Function.

References Type::Any, and y2internal.

Member Data Documentation

string Y2StdioFunction::m_name
private

Referenced by appendParameter(), evaluateCall(), and name().

string Y2StdioFunction::m_namespace
private

Referenced by appendParameter(), and evaluateCall().

vector<YCPValue> Y2StdioFunction::m_parameters
private
Y2ProgramComponent* Y2StdioFunction::m_sender
private

Referenced by evaluateCall().

constFunctionTypePtr Y2StdioFunction::m_type
private

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

Generated on a sunny day for yast2-core by doxygen 1.8.5