/** * @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 */