Mercurial > octave-nkf
comparison src/ov-base.h @ 9813:8fa32b527d9a
improve & partially revert previous change
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 13 Nov 2009 11:45:39 +0100 |
parents | f80c566bc751 |
children | 1bb1ed717d2f |
comparison
equal
deleted
inserted
replaced
9812:f80c566bc751 | 9813:8fa32b527d9a |
---|---|
115 DEF_CLASS_TO_BTYP (octave_uint32, btyp_uint32); | 115 DEF_CLASS_TO_BTYP (octave_uint32, btyp_uint32); |
116 DEF_CLASS_TO_BTYP (octave_uint64, btyp_uint64); | 116 DEF_CLASS_TO_BTYP (octave_uint64, btyp_uint64); |
117 DEF_CLASS_TO_BTYP (bool, btyp_bool); | 117 DEF_CLASS_TO_BTYP (bool, btyp_bool); |
118 DEF_CLASS_TO_BTYP (char, btyp_char); | 118 DEF_CLASS_TO_BTYP (char, btyp_char); |
119 | 119 |
120 // Standard mappers. | |
121 enum unary_mapper_t | |
122 { | |
123 umap_abs, | |
124 umap_acos, | |
125 umap_acosh, | |
126 umap_angle, | |
127 umap_arg, | |
128 umap_asin, | |
129 umap_asinh, | |
130 umap_atan, | |
131 umap_atanh, | |
132 umap_ceil, | |
133 umap_conj, | |
134 umap_cos, | |
135 umap_cosh, | |
136 umap_erf, | |
137 umap_erfc, | |
138 umap_exp, | |
139 umap_expm1, | |
140 umap_finite, | |
141 umap_fix, | |
142 umap_floor, | |
143 umap_gamma, | |
144 umap_imag, | |
145 umap_isinf, | |
146 umap_isna, | |
147 umap_isnan, | |
148 umap_lgamma, | |
149 umap_log, | |
150 umap_log2, | |
151 umap_log10, | |
152 umap_log1p, | |
153 umap_real, | |
154 umap_round, | |
155 umap_roundb, | |
156 umap_signum, | |
157 umap_sin, | |
158 umap_sinh, | |
159 umap_sqrt, | |
160 umap_tan, | |
161 umap_tanh, | |
162 umap_isalnum, | |
163 umap_isalpha, | |
164 umap_isascii, | |
165 umap_iscntrl, | |
166 umap_isdigit, | |
167 umap_isgraph, | |
168 umap_islower, | |
169 umap_isprint, | |
170 umap_ispunct, | |
171 umap_isspace, | |
172 umap_isupper, | |
173 umap_isxdigit, | |
174 umap_toascii, | |
175 umap_tolower, | |
176 umap_toupper, | |
177 umap_unknown, | |
178 num_unary_mappers = umap_unknown | |
179 }; | |
180 | |
181 extern OCTINTERP_API | |
182 const char *get_umap_name (unary_mapper_t); | |
183 | |
184 // T_ID is the type id of struct objects, set by register_type(). | 120 // T_ID is the type id of struct objects, set by register_type(). |
185 // T_NAME is the type name of struct objects. | 121 // T_NAME is the type name of struct objects. |
186 | 122 |
187 #define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA \ | 123 #define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA \ |
188 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 (OCTAVE_EMPTY_CPP_ARG) | 124 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 (OCTAVE_EMPTY_CPP_ARG) |
694 | 630 |
695 virtual bool islocked (void) const { return false; } | 631 virtual bool islocked (void) const { return false; } |
696 | 632 |
697 virtual void dump (std::ostream& os) const; | 633 virtual void dump (std::ostream& os) const; |
698 | 634 |
635 // Standard mappers. Register new ones here. | |
636 enum unary_mapper_t | |
637 { | |
638 umap_abs, | |
639 umap_acos, | |
640 umap_acosh, | |
641 umap_angle, | |
642 umap_arg, | |
643 umap_asin, | |
644 umap_asinh, | |
645 umap_atan, | |
646 umap_atanh, | |
647 umap_ceil, | |
648 umap_conj, | |
649 umap_cos, | |
650 umap_cosh, | |
651 umap_erf, | |
652 umap_erfc, | |
653 umap_exp, | |
654 umap_expm1, | |
655 umap_finite, | |
656 umap_fix, | |
657 umap_floor, | |
658 umap_gamma, | |
659 umap_imag, | |
660 umap_isinf, | |
661 umap_isna, | |
662 umap_isnan, | |
663 umap_lgamma, | |
664 umap_log, | |
665 umap_log2, | |
666 umap_log10, | |
667 umap_log1p, | |
668 umap_real, | |
669 umap_round, | |
670 umap_roundb, | |
671 umap_signum, | |
672 umap_sin, | |
673 umap_sinh, | |
674 umap_sqrt, | |
675 umap_tan, | |
676 umap_tanh, | |
677 umap_xisalnum, | |
678 umap_xisalpha, | |
679 umap_xisascii, | |
680 umap_xiscntrl, | |
681 umap_xisdigit, | |
682 umap_xisgraph, | |
683 umap_xislower, | |
684 umap_xisprint, | |
685 umap_xispunct, | |
686 umap_xisspace, | |
687 umap_xisupper, | |
688 umap_xisxdigit, | |
689 umap_xtoascii, | |
690 umap_xtolower, | |
691 umap_xtoupper, | |
692 umap_unknown, | |
693 num_unary_mappers = umap_unknown | |
694 }; | |
695 | |
699 virtual octave_value map (unary_mapper_t) const; | 696 virtual octave_value map (unary_mapper_t) const; |
700 | 697 |
701 protected: | 698 protected: |
702 | 699 |
703 // This should only be called for derived types. | 700 // This should only be called for derived types. |
730 // (think of an empty cell array with >2G elements). | 727 // (think of an empty cell array with >2G elements). |
731 octave_idx_type count; | 728 octave_idx_type count; |
732 | 729 |
733 private: | 730 private: |
734 | 731 |
732 static const char *get_umap_name (unary_mapper_t); | |
733 | |
735 static int curr_print_indent_level; | 734 static int curr_print_indent_level; |
736 static bool beginning_of_line; | 735 static bool beginning_of_line; |
737 | 736 |
738 DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA | 737 DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA |
739 }; | 738 }; |