initial commit

This commit is contained in:
boyreau 2026-11-04 18:00:08 +01:00
commit 549fbc6b74
31 changed files with 3377 additions and 0 deletions

40
devoir/include/division.h Normal file
View file

@ -0,0 +1,40 @@
/**
* @file division.h
* @brief Division mnemonic: pop two elements and push their quotient.
* @note Class is named "division" to avoid conflict with div_t from <stdlib.h>.
* The visitor method is still called visit_div() for brevity.
*/
#ifndef DIVISION_H
#define DIVISION_H
#include "mne.h"
/**
* @brief Forward declaration of non-derivable class Division.
*
*/
typedef struct _division_t division_t;
/**
* @brief Division vtable is identical to base Mne vtable (no new methods).
*
*/
typedef mne_vtable_t division_vtable_t;
/**
* @brief Constructs a Division mnemonic.
*
* @return A newly allocated Division mnemonic.
*/
division_t* division_build_default(void);
/**
* @brief Destroys a Division mnemonic (via polymorphic destructor).
*
* @param self The Division mnemonic (can be NULL).
* @note This is a convenience wrapper; normally destructed via mne_destroy().
*/
void division_destroy(division_t *self);
#endif /* DIVISION_H */