Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
XRuby Class Reference

#include <xrubysupport.h>

Inheritance diagram for XRuby:
Inheritance graph
[legend]

Classes

struct  Payload
 

Public Member Functions

 XRuby (const char *name, bool runtime, const shared_ptr< XMeasure > &measure)
 
void resume ()
 
void terminate ()
 
void join ()
 
- Public Member Functions inherited from XAliasListNode< XRubyThread >
 XAliasListNode (const char *name, bool runtime=false)
 
virtual bool isThreadSafeDuringCreationByTypename () const
 
virtual shared_ptr< XNodecreateByTypename (const XString &, const XString &)
 
- Public Member Functions inherited from XListNodeBase
 XListNodeBase (const char *name, bool runtime=false)
 
- Public Member Functions inherited from XNode
 XNode (const char *name, bool runtime=false)
 
template<class T >
shared_ptr< T > create (const char *name)
 
template<class T , typename... Args>
shared_ptr< T > create (const char *name, bool runtime, Args &&...args)
 
template<class T >
shared_ptr< T > create (Transaction &tr, const char *name)
 
template<class T , typename... Args>
shared_ptr< T > create (Transaction &tr, const char *name, bool runtime, Args &&...args)
 
XString getName () const
 
virtual XString getLabel () const
 
XString getTypename () const
 
shared_ptr< XNodegetChild (const XString &var) const
 
shared_ptr< XNodegetParent () const
 
void setUIEnabled (bool v)
 Enables/disables controls over scripting/GUI.
 
void disable ()
 Disables all scripting/GUI operations on this node hereafter.
 
- Public Member Functions inherited from Transactional::Node< XNode >
bool insert (Transaction< XNode > &tr, const shared_ptr< XNode > &var, bool online_after_insertion=false)
 
void insert (const shared_ptr< XNode > &var)
 
bool release (Transaction< XNode > &tr, const shared_ptr< XNode > &var)
 
void release (const shared_ptr< XNode > &var)
 
void releaseAll ()
 
bool swap (Transaction< XNode > &tr, const shared_ptr< XNode > &x, const shared_ptr< XNode > &y)
 
void swap (const shared_ptr< XNode > &x, const shared_ptr< XNode > &y)
 
XNodeupperNode (Snapshot< XNode > &shot)
 Finds the parent node in shot.
 
Snapshot< XNodeiterate_commit (Closure)
 
Snapshot< XNodeiterate_commit_if (Closure)
 
void iterate_commit_while (Closure)
 
void print_ () const
 
 Node (const Node &)=delete
 
Nodeoperator= (const Node &)=delete
 

Protected Member Functions

virtual void * execute (const atomic< bool > &)
 

Private Member Functions

shared_ptr< XRubyThreadfindRubyThread (const shared_ptr< XNode > &self, Ruby::Value threadid)
 Ruby Objects.
 
Ruby::Value my_rbdefout (const shared_ptr< XNode > &, Ruby::Value str, Ruby::Value threadid)
 def. output write()
 
Ruby::Value my_rbdefin (const shared_ptr< XNode > &, Ruby::Value threadid)
 def. input gets(). Return nil if the buffer is empty.
 
Ruby::Value is_main_terminated (const shared_ptr< XNode > &node)
 
Ruby::Value rnode_create (const shared_ptr< XNode > &)
 
Ruby::Value rnode_name (const shared_ptr< XNode > &)
 
Ruby::Value rnode_touch (const shared_ptr< XNode > &)
 
Ruby::Value rnode_count (const shared_ptr< XNode > &)
 
Ruby::Value rnode_child (const shared_ptr< XNode > &, Ruby::Value)
 
Ruby::Value rvaluenode_set (const shared_ptr< XNode > &node, Ruby::Value)
 
Ruby::Value rvaluenode_load (const shared_ptr< XNode > &node, Ruby::Value)
 
Ruby::Value rvaluenode_get (const shared_ptr< XNode > &node)
 
Ruby::Value rvaluenode_to_str (const shared_ptr< XNode > &node)
 
Ruby::Value rlistnode_create_child (const shared_ptr< XNode > &, Ruby::Value, Ruby::Value)
 
Ruby::Value rlistnode_release_child (const shared_ptr< XNode > &, Ruby::Value)
 
void onChildCreated (const Snapshot &shot, const shared_ptr< Payload::tCreateChild > &x)
 

Static Private Member Functions

static void strOnNode (const shared_ptr< XValueNodeBase > &node, Ruby::Value value)
 XNode wrappers.
 
static Ruby::Value getValueOfNode (const shared_ptr< XValueNodeBase > &node)
 

Private Attributes

shared_ptr< XListenerm_lsnChildCreated
 
const weak_ptr< XMeasurem_measure
 
XThread< XRubym_thread
 
unique_ptr< Rubym_ruby
 
unique_ptr< Ruby::Class< XRuby,
XNode > > 
m_rubyClassNode
 
unique_ptr< Ruby::Class< XRuby,
XNode > > 
m_rubyClassValueNode
 
unique_ptr< Ruby::Class< XRuby,
XNode > > 
m_rubyClassListNode
 

Additional Inherited Members

- Public Types inherited from Transactional::Node< XNode >
using NodeNotFoundError = std::domain_error
 
using NodeList = fast_vector< shared_ptr< XNode >, 2 >
 
using iterator = typename NodeList::iterator
 
using const_iterator = typename NodeList::const_iterator
 
- Static Public Member Functions inherited from XNode
template<class T__ >
static shared_ptr< T__ > createOrphan (const char *name)
 
template<class T__ , typename... Args_>
static shared_ptr< T__ > createOrphan (const char *name, bool runtime, Args_ &&...args)
 

Detailed Description

Ruby scripting support, containing a thread running Ruby monitor program. The monitor program synchronize Ruby threads and XRubyThread objects.

See Also
XRubyThread

Definition at line 29 of file xrubysupport.h.


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

Generated for KAME4 by  doxygen 1.8.3