initial commit
This commit is contained in:
commit
549fbc6b74
31 changed files with 3377 additions and 0 deletions
48
devoir/include/push.h
Normal file
48
devoir/include/push.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/**
|
||||
* @file push.h
|
||||
* @brief Push mnemonic: push an integer value onto the stack.
|
||||
*/
|
||||
|
||||
#ifndef PUSH_H
|
||||
#define PUSH_H
|
||||
|
||||
#include "mne.h"
|
||||
|
||||
/**
|
||||
* @brief Forward declaration of non-derivable class Push.
|
||||
*
|
||||
*/
|
||||
typedef struct _push_t push_t;
|
||||
|
||||
/**
|
||||
* @brief Push vtable is identical to base Mne vtable (no new methods).
|
||||
*
|
||||
*/
|
||||
typedef mne_vtable_t push_vtable_t;
|
||||
|
||||
/**
|
||||
* @brief Constructs a Push mnemonic with a given value.
|
||||
*
|
||||
* @param value The value to push.
|
||||
* @return A newly allocated Push mnemonic.
|
||||
*/
|
||||
push_t* push_build_logic(const long value);
|
||||
|
||||
/**
|
||||
* @brief Destroys a Push mnemonic (via polymorphic destructor).
|
||||
*
|
||||
* @param self The Push mnemonic (can be NULL).
|
||||
* @note This is a convenience wrapper; normally destructed via mne_destroy().
|
||||
*/
|
||||
void push_destroy(push_t *self);
|
||||
|
||||
/**
|
||||
* @brief Returns the value of this Push mnemonic.
|
||||
*
|
||||
* @param self The Push mnemonic.
|
||||
* @pre self != NULL.
|
||||
* @return The value to be pushed.
|
||||
*/
|
||||
long push_value(const push_t *const self);
|
||||
|
||||
#endif /* PUSH_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue