summaryrefslogtreecommitdiff
path: root/src/lib/embryo/Embryo.h
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2020-03-03 18:46:36 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2020-03-03 18:49:20 +0100
commit43f98b2d46eef463a6cbef55c265aaba1fb1345b (patch)
treee51f3cbe5854061dd9b48e65247b130ab479c22d /src/lib/embryo/Embryo.h
parentc5b1694985bd9cfd74042c666605df911ecd7474 (diff)
doxygen docs: Fix several group problems
@ingroup before @addgroup, circular group dependencies...
Diffstat (limited to 'src/lib/embryo/Embryo.h')
-rw-r--r--src/lib/embryo/Embryo.h144
1 files changed, 72 insertions, 72 deletions
diff --git a/src/lib/embryo/Embryo.h b/src/lib/embryo/Embryo.h
index 21177bddfc..84e39aca46 100644
--- a/src/lib/embryo/Embryo.h
+++ b/src/lib/embryo/Embryo.h
@@ -521,14 +521,6 @@ EAPI Embryo_Program *embryo_program_load(const char *file);
521 * @ingroup Embryo_Program_Creation_Group 521 * @ingroup Embryo_Program_Creation_Group
522 */ 522 */
523EAPI void embryo_program_free(Embryo_Program *ep); 523EAPI void embryo_program_free(Embryo_Program *ep);
524
525/**
526 * Adds a native program call to the given Embryo program.
527 * @param ep The given Embryo program.
528 * @param name The name for the call used in the script.
529 * @param func The function to use when the call is made.
530 * @ingroup Embryo_Func_Group
531 */
532 524
533/** 525/**
534 * @defgroup Embryo_Func_Group Function Functions 526 * @defgroup Embryo_Func_Group Function Functions
@@ -536,13 +528,15 @@ EAPI void embryo_program_free(Embryo_Program *ep);
536 * 528 *
537 * Functions that deal with Embryo program functions. 529 * Functions that deal with Embryo program functions.
538 */ 530 */
539EAPI void embryo_program_native_call_add(Embryo_Program *ep, const char *name, Embryo_Cell (*func) (Embryo_Program *ep, Embryo_Cell *params));
540 531
541/** 532/**
542 * Resets the current virtual machine session of the given program. 533 * Adds a native program call to the given Embryo program.
543 * @param ep The given program. 534 * @param ep The given Embryo program.
544 * @ingroup Embryo_Program_VM_Group 535 * @param name The name for the call used in the script.
536 * @param func The function to use when the call is made.
537 * @ingroup Embryo_Func_Group
545 */ 538 */
539EAPI void embryo_program_native_call_add(Embryo_Program *ep, const char *name, Embryo_Cell (*func) (Embryo_Program *ep, Embryo_Cell *params));
546 540
547/** 541/**
548 * @defgroup Embryo_Program_VM_Group Virtual Machine Functions 542 * @defgroup Embryo_Program_VM_Group Virtual Machine Functions
@@ -563,6 +557,12 @@ EAPI void embryo_program_native_call_add(Embryo_Program *ep, const c
563 * The current virtual machine session can be destroyed by calling 557 * The current virtual machine session can be destroyed by calling
564 * @ref embryo_program_vm_pop. 558 * @ref embryo_program_vm_pop.
565 */ 559 */
560
561/**
562 * Resets the current virtual machine session of the given program.
563 * @param ep The given program.
564 * @ingroup Embryo_Program_VM_Group
565 */
566EAPI void embryo_program_vm_reset(Embryo_Program *ep); 566EAPI void embryo_program_vm_reset(Embryo_Program *ep);
567 567
568/** 568/**
@@ -586,13 +586,6 @@ EAPI void embryo_program_vm_push(Embryo_Program *ep);
586 * @ingroup Embryo_Program_VM_Group 586 * @ingroup Embryo_Program_VM_Group
587 */ 587 */
588EAPI void embryo_program_vm_pop(Embryo_Program *ep); 588EAPI void embryo_program_vm_pop(Embryo_Program *ep);
589
590/**
591 * Ensures that the given unsigned short integer is in the small
592 * endian format.
593 * @param v Pointer to the given integer.
594 * @ingroup Embryo_Swap_Group
595 */
596 589
597/** 590/**
598 * @defgroup Embryo_Swap_Group Byte Swapping Functions 591 * @defgroup Embryo_Swap_Group Byte Swapping Functions
@@ -603,6 +596,13 @@ EAPI void embryo_program_vm_pop(Embryo_Program *ep);
603 * used to ensure that the virtual machine operates correctly on big 596 * used to ensure that the virtual machine operates correctly on big
604 * endian machines. 597 * endian machines.
605 */ 598 */
599
600/**
601 * Ensures that the given unsigned short integer is in the small
602 * endian format.
603 * @param v Pointer to the given integer.
604 * @ingroup Embryo_Swap_Group
605 */
606EAPI void embryo_swap_16(unsigned short *v); 606EAPI void embryo_swap_16(unsigned short *v);
607 607
608/** 608/**
@@ -623,6 +623,15 @@ EAPI void embryo_swap_32(unsigned int *v);
623EAPI Embryo_Function embryo_program_function_find(Embryo_Program *ep, const char *name); 623EAPI Embryo_Function embryo_program_function_find(Embryo_Program *ep, const char *name);
624 624
625/** 625/**
626 * @defgroup Embryo_Public_Variable_Group Public Variable Access Functions
627 * @ingroup Embryo
628 *
629 * In an Embryo program, a global variable can be declared public, as
630 * described in @ref Small_Scope_Subsection. The functions here allow
631 * the host program to access these public variables.
632 */
633
634/**
626 * Retrieves the location of the public variable in the given program 635 * Retrieves the location of the public variable in the given program
627 * with the given name. 636 * with the given name.
628 * @param ep The given program. 637 * @param ep The given program.
@@ -631,15 +640,6 @@ EAPI Embryo_Function embryo_program_function_find(Embryo_Program *ep, const cha
631 * otherwise. 640 * otherwise.
632 * @ingroup Embryo_Public_Variable_Group 641 * @ingroup Embryo_Public_Variable_Group
633 */ 642 */
634
635/**
636 * @defgroup Embryo_Public_Variable_Group Public Variable Access Functions
637 * @ingroup Embryo
638 *
639 * In an Embryo program, a global variable can be declared public, as
640 * described in @ref Small_Scope_Subsection. The functions here allow
641 * the host program to access these public variables.
642 */
643EAPI Embryo_Cell embryo_program_variable_find(Embryo_Program *ep, const char *name); 643EAPI Embryo_Cell embryo_program_variable_find(Embryo_Program *ep, const char *name);
644 644
645/** 645/**
@@ -660,13 +660,6 @@ EAPI int embryo_program_variable_count_get(Embryo_Program *ep);
660 * @ingroup Embryo_Public_Variable_Group 660 * @ingroup Embryo_Public_Variable_Group
661 */ 661 */
662EAPI Embryo_Cell embryo_program_variable_get(Embryo_Program *ep, int num); 662EAPI Embryo_Cell embryo_program_variable_get(Embryo_Program *ep, int num);
663
664/**
665 * Sets the error code for the given program to the given code.
666 * @param ep The given program.
667 * @param error The given error code.
668 * @ingroup Embryo_Error_Group
669 */
670 663
671/** 664/**
672 * @defgroup Embryo_Error_Group Error Functions 665 * @defgroup Embryo_Error_Group Error Functions
@@ -674,6 +667,13 @@ EAPI Embryo_Cell embryo_program_variable_get(Embryo_Program *ep, int num);
674 * 667 *
675 * Functions that set and retrieve error codes in Embryo programs. 668 * Functions that set and retrieve error codes in Embryo programs.
676 */ 669 */
670
671/**
672 * Sets the error code for the given program to the given code.
673 * @param ep The given program.
674 * @param error The given error code.
675 * @ingroup Embryo_Error_Group
676 */
677EAPI void embryo_program_error_set(Embryo_Program *ep, Embryo_Error error); 677EAPI void embryo_program_error_set(Embryo_Program *ep, Embryo_Error error);
678 678
679/** 679/**
@@ -683,13 +683,6 @@ EAPI void embryo_program_error_set(Embryo_Program *ep, Embryo_Error
683 * @ingroup Embryo_Error_Group 683 * @ingroup Embryo_Error_Group
684 */ 684 */
685EAPI Embryo_Error embryo_program_error_get(Embryo_Program *ep); 685EAPI Embryo_Error embryo_program_error_get(Embryo_Program *ep);
686
687/**
688 * Sets the data associated to the given program.
689 * @param ep The given program.
690 * @param data New bytecode data.
691 * @ingroup Embryo_Program_Data_Group
692 */
693 686
694/** 687/**
695 * @defgroup Embryo_Program_Data_Group Program Data Functions 688 * @defgroup Embryo_Program_Data_Group Program Data Functions
@@ -698,6 +691,13 @@ EAPI Embryo_Error embryo_program_error_get(Embryo_Program *ep);
698 * Functions that set and retrieve data associated with the given 691 * Functions that set and retrieve data associated with the given
699 * program. 692 * program.
700 */ 693 */
694
695/**
696 * Sets the data associated to the given program.
697 * @param ep The given program.
698 * @param data New bytecode data.
699 * @ingroup Embryo_Program_Data_Group
700 */
701EAPI void embryo_program_data_set(Embryo_Program *ep, void *data); 701EAPI void embryo_program_data_set(Embryo_Program *ep, void *data);
702 702
703/** 703/**
@@ -715,6 +715,13 @@ EAPI void *embryo_program_data_get(Embryo_Program *ep);
715 * @ingroup Embryo_Error_Group 715 * @ingroup Embryo_Error_Group
716 */ 716 */
717EAPI const char *embryo_error_string_get(Embryo_Error error); 717EAPI const char *embryo_error_string_get(Embryo_Error error);
718
719/**
720 * @defgroup Embryo_Data_String_Group Embryo Data String Functions
721 * @ingroup Embryo
722 *
723 * Functions that operate on strings in the memory of a virtual machine.
724 */
718 725
719/** 726/**
720 * Retrieves the length of the string starting at the given cell. 727 * Retrieves the length of the string starting at the given cell.
@@ -723,13 +730,6 @@ EAPI const char *embryo_error_string_get(Embryo_Error error);
723 * @return The length of the string. @c 0 is returned if there is an error. 730 * @return The length of the string. @c 0 is returned if there is an error.
724 * @ingroup Embryo_Data_String_Group 731 * @ingroup Embryo_Data_String_Group
725 */ 732 */
726
727/**
728 * @defgroup Embryo_Data_String_Group Embryo Data String Functions
729 * @ingroup Embryo
730 *
731 * Functions that operate on strings in the memory of a virtual machine.
732 */
733EAPI int embryo_data_string_length_get(Embryo_Program *ep, Embryo_Cell *str_cell); 733EAPI int embryo_data_string_length_get(Embryo_Program *ep, Embryo_Cell *str_cell);
734 734
735/** 735/**
@@ -760,6 +760,15 @@ EAPI void embryo_data_string_set(Embryo_Program *ep, const char *src
760 * @ingroup Embryo_Data_String_Group 760 * @ingroup Embryo_Data_String_Group
761 */ 761 */
762EAPI Embryo_Cell *embryo_data_address_get(Embryo_Program *ep, Embryo_Cell addr); 762EAPI Embryo_Cell *embryo_data_address_get(Embryo_Program *ep, Embryo_Cell addr);
763
764/**
765 * @defgroup Embryo_Heap_Group Heap Functions
766 * @ingroup Embryo
767 *
768 * The heap is an area of memory that can be allocated for program
769 * use at runtime. The heap functions here change the amount of heap
770 * memory available.
771 */
763 772
764/** 773/**
765 * Increases the size of the heap of the given virtual machine by the given 774 * Increases the size of the heap of the given virtual machine by the given
@@ -770,15 +779,6 @@ EAPI Embryo_Cell *embryo_data_address_get(Embryo_Program *ep, Embryo_Cell ad
770 * @c EMBRYO_CELL_NONE otherwise. 779 * @c EMBRYO_CELL_NONE otherwise.
771 * @ingroup Embryo_Heap_Group 780 * @ingroup Embryo_Heap_Group
772 */ 781 */
773
774/**
775 * @defgroup Embryo_Heap_Group Heap Functions
776 * @ingroup Embryo
777 *
778 * The heap is an area of memory that can be allocated for program
779 * use at runtime. The heap functions here change the amount of heap
780 * memory available.
781 */
782EAPI Embryo_Cell embryo_data_heap_push(Embryo_Program *ep, int cells); 782EAPI Embryo_Cell embryo_data_heap_push(Embryo_Program *ep, int cells);
783 783
784/** 784/**
@@ -789,13 +789,6 @@ EAPI Embryo_Cell embryo_data_heap_push(Embryo_Program *ep, int cells);
789 * @ingroup Embryo_Heap_Group 789 * @ingroup Embryo_Heap_Group
790 */ 790 */
791EAPI void embryo_data_heap_pop(Embryo_Program *ep, Embryo_Cell down_to); 791EAPI void embryo_data_heap_pop(Embryo_Program *ep, Embryo_Cell down_to);
792
793/**
794 * Returns the number of virtual machines are running for the given program.
795 * @param ep The given program.
796 * @return The number of virtual machines running.
797 * @ingroup Embryo_Run_Group
798 */
799 792
800/** 793/**
801 * @defgroup Embryo_Run_Group Program Run Functions 794 * @defgroup Embryo_Run_Group Program Run Functions
@@ -804,6 +797,13 @@ EAPI void embryo_data_heap_pop(Embryo_Program *ep, Embryo_Cell down_
804 * Functions that are involved in actually running functions in an 797 * Functions that are involved in actually running functions in an
805 * Embryo program. 798 * Embryo program.
806 */ 799 */
800
801/**
802 * Returns the number of virtual machines are running for the given program.
803 * @param ep The given program.
804 * @return The number of virtual machines running.
805 * @ingroup Embryo_Run_Group
806 */
807EAPI int embryo_program_recursion_get(Embryo_Program *ep); 807EAPI int embryo_program_recursion_get(Embryo_Program *ep);
808 808
809/** 809/**
@@ -901,6 +901,13 @@ EAPI void embryo_program_max_cycle_run_set(Embryo_Program *ep, int m
901EAPI int embryo_program_max_cycle_run_get(Embryo_Program *ep); 901EAPI int embryo_program_max_cycle_run_get(Embryo_Program *ep);
902 902
903/** 903/**
904 * @defgroup Embryo_Parameter_Group Function Parameter Functions
905 * @ingroup Embryo
906 *
907 * Functions that set parameters for the next function that is called.
908 */
909
910/**
904 * Pushes an Embryo_Cell onto the function stack to use as a parameter for 911 * Pushes an Embryo_Cell onto the function stack to use as a parameter for
905 * the next function that is called in the given program. 912 * the next function that is called in the given program.
906 * @param ep The given program. 913 * @param ep The given program.
@@ -908,13 +915,6 @@ EAPI int embryo_program_max_cycle_run_get(Embryo_Program *ep);
908 * @return @c 1 if successful. @c 0 otherwise. 915 * @return @c 1 if successful. @c 0 otherwise.
909 * @ingroup Embryo_Parameter_Group 916 * @ingroup Embryo_Parameter_Group
910 */ 917 */
911
912/**
913 * @defgroup Embryo_Parameter_Group Function Parameter Functions
914 * @ingroup Embryo
915 *
916 * Functions that set parameters for the next function that is called.
917 */
918EAPI int embryo_parameter_cell_push(Embryo_Program *ep, Embryo_Cell cell); 918EAPI int embryo_parameter_cell_push(Embryo_Program *ep, Embryo_Cell cell);
919 919
920/** 920/**