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

The BlockPrototype class represents the prototype of a custom block. More...

#include <scratchcpp/blockprototype.h>

Public Types

enum class  ArgType { StringNum , Bool }
 

Public Member Functions

 BlockPrototype ()
 
 BlockPrototype (const std::string &procCode)
 
const std::string & procCode () const
 
void setProcCode (const std::string &newProcCode)
 
const std::vector< std::string > & argumentIds () const
 
void setArgumentIds (const std::vector< std::string > &newArgumentIds)
 
const std::vector< std::string > & argumentNames () const
 
void setArgumentNames (const std::vector< std::string > &newArgumentNames)
 
const std::vector< Value > & argumentDefaults () const
 
const std::vector< ArgType > & argumentTypes () const
 
bool warp () const
 
void setWarp (bool newWarp)
 

Detailed Description

The BlockPrototype class represents the prototype of a custom block.

Member Enumeration Documentation

◆ ArgType

Enumerator
StringNum 
Bool 

Constructor & Destructor Documentation

◆ BlockPrototype() [1/2]

BlockPrototype::BlockPrototype ( )

Constructs BlockPrototype.

◆ BlockPrototype() [2/2]

BlockPrototype::BlockPrototype ( const std::string & procCode)

Constructs BlockPrototype with the given proc code.

Member Function Documentation

◆ argumentDefaults()

const std::vector< Value > & BlockPrototype::argumentDefaults ( ) const

Returns the list of argument default values.

◆ argumentIds()

const std::vector< std::string > & BlockPrototype::argumentIds ( ) const

Returns the list of argument IDs.

◆ argumentNames()

const std::vector< std::string > & BlockPrototype::argumentNames ( ) const

Returns the list of argument names.

◆ argumentTypes()

const std::vector< BlockPrototype::ArgType > & BlockPrototype::argumentTypes ( ) const

Returns the list of argument types.

◆ procCode()

const std::string & BlockPrototype::procCode ( ) const

Returns the name of the custom block, including inputs.

◆ setArgumentIds()

void BlockPrototype::setArgumentIds ( const std::vector< std::string > & newArgumentIds)

Sets the list of argument IDs.

◆ setArgumentNames()

void BlockPrototype::setArgumentNames ( const std::vector< std::string > & newArgumentNames)

Sets the list of argument names.

◆ setProcCode()

void BlockPrototype::setProcCode ( const std::string & newProcCode)

Sets the name of the custom block, including inputs.

◆ setWarp()

void BlockPrototype::setWarp ( bool newWarp)

Sets whether to run the block without screen refresh.

◆ warp()

bool BlockPrototype::warp ( ) const

Returns true if the block is set to run without screen refresh.


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