libscratchcpp
A library for C++ based Scratch project players
Loading...
Searching...
No Matches
libscratchcpp::Field Class Reference

The Field class represents a Scratch block field. More...

#include <scratchcpp/field.h>

Public Member Functions

 Field (const std::string &name, const Value &value, std::shared_ptr< Entity > valuePtr=nullptr)
 
 Field (const std::string &name, const Value &value, const std::string &valueId)
 
 Field (const std::string &name, const Value &value, const char *valueId)
 
 Field (const Field &)=delete
 
const std::string & name () const
 
const Valuevalue () const
 
std::shared_ptr< EntityvaluePtr () const
 
void setValuePtr (const std::shared_ptr< Entity > &newValuePtr)
 
const std::string & valueId () const
 

Detailed Description

The Field class represents a Scratch block field.

Constructor & Destructor Documentation

◆ Field() [1/4]

Field::Field ( const std::string & name,
const Value & value,
std::shared_ptr< Entity > valuePtr = nullptr )

Constructs Field.

◆ Field() [2/4]

Field::Field ( const std::string & name,
const Value & value,
const std::string & valueId )

Constructs Field.

◆ Field() [3/4]

Field::Field ( const std::string & name,
const Value & value,
const char * valueId )

Constructs Field.

◆ Field() [4/4]

libscratchcpp::Field::Field ( const Field & )
delete

Member Function Documentation

◆ name()

const std::string & Field::name ( ) const

Returns the name of the field.

◆ setValuePtr()

void Field::setValuePtr ( const std::shared_ptr< Entity > & newValuePtr)

Sets the value pointer.

◆ value()

const Value & Field::value ( ) const

Returns the value of the field.

◆ valueId()

const std::string & Field::valueId ( ) const

Returns the ID of the value (e. g. a variable).

◆ valuePtr()

std::shared_ptr< Entity > Field::valuePtr ( ) const

Returns a pointer to the value (e. g. a variable).


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