CpgInstruction

CpgInstruction

Synopsis

#define             CPG_INSTRUCTION_CONST               (obj)
struct              CpgInstruction;
struct              CpgInstructionClass;
gchar *             cpg_instruction_to_string           (CpgInstruction *instruction);
void                cpg_instruction_execute             (CpgInstruction *instruction,
                                                         CpgStack *stack);
gint                cpg_instruction_get_stack_count     (CpgInstruction *instruction);
GSList *            cpg_instruction_get_dependencies    (CpgInstruction *instruction);
gboolean            cpg_instruction_equal               (CpgInstruction *i1,
                                                         CpgInstruction *i2);
                    CpgInstructionPrivate;

Object Hierarchy

  CpgMiniObject
   +----CpgInstruction
         +----CpgInstructionNumber
         +----CpgInstructionCustomFunction
         +----CpgInstructionCustomOperator
         +----CpgInstructionFunction
         +----CpgInstructionProperty

Description

Details

CPG_INSTRUCTION_CONST()

#define CPG_INSTRUCTION_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CPG_TYPE_INSTRUCTION, CpgInstruction const))


struct CpgInstruction

struct CpgInstruction;

The base instruction. All other instructions are derived from this.


struct CpgInstructionClass

struct CpgInstructionClass {
	CpgMiniObjectClass parent_class;

	gchar  *(*to_string)	    (CpgInstruction *instruction);
	void    (*execute)          (CpgInstruction *instruction,
	                             CpgStack       *stack);
	gint    (*get_stack_count)  (CpgInstruction *instruction);
	GSList *(*get_dependencies) (CpgInstruction *instruction);

	gboolean (*equal)           (CpgInstruction *i1,
	                             CpgInstruction *i2);
};


cpg_instruction_to_string ()

gchar *             cpg_instruction_to_string           (CpgInstruction *instruction);


cpg_instruction_execute ()

void                cpg_instruction_execute             (CpgInstruction *instruction,
                                                         CpgStack *stack);


cpg_instruction_get_stack_count ()

gint                cpg_instruction_get_stack_count     (CpgInstruction *instruction);


cpg_instruction_get_dependencies ()

GSList *            cpg_instruction_get_dependencies    (CpgInstruction *instruction);

Get the properties on which the instruction depends.

instruction :

A CpgInstruction

Returns :

A GSList of CpgProperty. The list should be freed with g_slist_free when no longer used. [element-type CpgProperty][transfer container]

cpg_instruction_equal ()

gboolean            cpg_instruction_equal               (CpgInstruction *i1,
                                                         CpgInstruction *i2);


CpgInstructionPrivate

typedef struct _CpgInstructionPrivate CpgInstructionPrivate;