[181] | 1 | #include <jenga/include/smoothie/Smoothie.h>
|
---|
[172] | 2 | #include <jenga/include/smoothie/Class.h>
|
---|
| 3 | #include <jenga/include/smoothie/SmoothieException.h>
|
---|
| 4 |
|
---|
| 5 | using namespace std;
|
---|
| 6 |
|
---|
| 7 | const int Type::basicTypeList[] = {
|
---|
| 8 | DEF_BYTE,
|
---|
| 9 | DEF_SBYTE,
|
---|
| 10 | DEF_WORD,
|
---|
| 11 | DEF_INTEGER,
|
---|
| 12 | DEF_DWORD,
|
---|
| 13 | DEF_LONG,
|
---|
| 14 | DEF_QWORD,
|
---|
| 15 | DEF_INT64,
|
---|
| 16 |
|
---|
| 17 | DEF_SINGLE,
|
---|
| 18 | DEF_DOUBLE,
|
---|
| 19 |
|
---|
| 20 | DEF_BOOLEAN,
|
---|
| 21 |
|
---|
| 22 | DEF_PTR_VOID,
|
---|
| 23 |
|
---|
| 24 | DEF_ANY,
|
---|
| 25 |
|
---|
| 26 | DEF_NON
|
---|
| 27 | };
|
---|
| 28 |
|
---|
| 29 | const string Type::basicTypeNameList[] = {
|
---|
| 30 | "Byte",
|
---|
| 31 | "SByte",
|
---|
| 32 | "Word",
|
---|
| 33 | "Integer",
|
---|
| 34 | "DWord",
|
---|
| 35 | "Long",
|
---|
| 36 | "QWord",
|
---|
| 37 | "Int64",
|
---|
| 38 |
|
---|
| 39 | "Single",
|
---|
| 40 | "Double",
|
---|
| 41 |
|
---|
| 42 | "Boolean",
|
---|
| 43 |
|
---|
| 44 | "VoidPtr",
|
---|
| 45 |
|
---|
| 46 | "Any",
|
---|
| 47 |
|
---|
| 48 | ""
|
---|
| 49 | };
|
---|
| 50 |
|
---|
| 51 | bool Type::StringToBasicType( const string &typeName, int &basicType ){
|
---|
| 52 | for( int i=0; ; i++ ){
|
---|
| 53 | if( basicTypeList[i] == DEF_NON ){
|
---|
| 54 | break;
|
---|
| 55 | }
|
---|
| 56 | if( basicTypeNameList[i] == typeName ){
|
---|
| 57 | basicType = basicTypeList[i];
|
---|
| 58 | return true;
|
---|
| 59 | }
|
---|
| 60 | }
|
---|
| 61 | return false;
|
---|
| 62 | }
|
---|
| 63 |
|
---|
[181] | 64 |
|
---|
[172] | 65 | bool Type::StringToType( const string &typeName, Type &type ){
|
---|
| 66 | type.index = -1;
|
---|
| 67 |
|
---|
| 68 | if( typeName[0] == '*' ){
|
---|
| 69 | if( typeName.size() >= 3
|
---|
| 70 | && typeName[1] == 1 && ( typeName[2] == ESC_FUNCTION || typeName[2] == ESC_SUB ) ){
|
---|
| 71 | //関数ポインタ(*Function)
|
---|
| 72 | type.basicType = DEF_PTR_PROC;
|
---|
[181] | 73 | type.index = Smoothie::GetMeta().GetProcPointers().Add( typeName );
|
---|
[172] | 74 | return true;
|
---|
| 75 | }
|
---|
| 76 |
|
---|
| 77 | const string &nextTypeName = typeName.substr( 1 );
|
---|
| 78 |
|
---|
| 79 | if( !StringToType( nextTypeName, type ) ){
|
---|
| 80 | return false;
|
---|
| 81 | }
|
---|
| 82 |
|
---|
| 83 | type.PtrLevelUp();
|
---|
| 84 |
|
---|
| 85 | return true;
|
---|
| 86 | }
|
---|
| 87 |
|
---|
| 88 | if( StringToBasicType( typeName, type.basicType ) ){
|
---|
| 89 | // 基本型だったとき
|
---|
| 90 | return true;
|
---|
| 91 | }
|
---|
| 92 |
|
---|
| 93 |
|
---|
| 94 | // Object型だったとき
|
---|
| 95 | if( typeName == "Object" ){
|
---|
[181] | 96 | type.SetType( DEF_OBJECT, Smoothie::GetMeta().GetClasses().GetObjectClassPtr() );
|
---|
[172] | 97 | return true;
|
---|
| 98 | }
|
---|
| 99 |
|
---|
| 100 | // String型だったとき
|
---|
| 101 | if( typeName == "String" ){
|
---|
[181] | 102 | type.SetType( DEF_OBJECT, Smoothie::GetMeta().GetClasses().GetStringClassPtr() );
|
---|
[172] | 103 | return true;
|
---|
| 104 | }
|
---|
| 105 |
|
---|
| 106 |
|
---|
| 107 | ////////////////////
|
---|
| 108 | // TypeDefされた型
|
---|
| 109 | ////////////////////
|
---|
[181] | 110 | int i=Smoothie::GetMeta().typeDefs.GetIndex( typeName );
|
---|
[172] | 111 | if(i!=-1){
|
---|
[181] | 112 | type = Smoothie::GetMeta().typeDefs[i].GetBaseType();
|
---|
[172] | 113 | return true;
|
---|
| 114 | }
|
---|
| 115 |
|
---|
| 116 | //クラス
|
---|
[181] | 117 | const CClass *pobj_c = Smoothie::GetMeta().GetClasses().Find( typeName );
|
---|
[172] | 118 | if(pobj_c){
|
---|
| 119 | type.pClass = pobj_c;
|
---|
| 120 |
|
---|
| 121 | if( pobj_c->IsStructure() ){
|
---|
| 122 | type.basicType = DEF_STRUCT;
|
---|
| 123 | }
|
---|
| 124 | else{
|
---|
| 125 | type.basicType = DEF_OBJECT;
|
---|
| 126 | }
|
---|
| 127 | return true;
|
---|
| 128 | }
|
---|
| 129 |
|
---|
| 130 | return false;
|
---|
[181] | 131 | }
|
---|
[172] | 132 |
|
---|
| 133 | int Type::GetBasicSize( int basicType )
|
---|
| 134 | {
|
---|
| 135 |
|
---|
| 136 | // 基本型
|
---|
| 137 | switch( basicType ){
|
---|
| 138 | case DEF_SBYTE:
|
---|
| 139 | case DEF_BYTE:
|
---|
| 140 | case DEF_BOOLEAN:
|
---|
| 141 | return sizeof(BYTE);
|
---|
| 142 |
|
---|
| 143 | case DEF_INTEGER:
|
---|
| 144 | case DEF_WORD:
|
---|
| 145 | return sizeof(WORD);
|
---|
| 146 |
|
---|
| 147 | case DEF_LONG:
|
---|
| 148 | case DEF_DWORD:
|
---|
| 149 | return sizeof(DWORD);
|
---|
| 150 |
|
---|
| 151 | case DEF_INT64:
|
---|
| 152 | case DEF_QWORD:
|
---|
| 153 | return sizeof(_int64);
|
---|
| 154 |
|
---|
| 155 | case DEF_DOUBLE:
|
---|
| 156 | return sizeof(double);
|
---|
| 157 | case DEF_SINGLE:
|
---|
| 158 | return sizeof(float);
|
---|
| 159 | }
|
---|
| 160 |
|
---|
| 161 | // ポインタ
|
---|
| 162 | if(IsPointer( basicType )){
|
---|
| 163 | return PTR_SIZE;
|
---|
| 164 | }
|
---|
| 165 |
|
---|
| 166 | // オブジェクト
|
---|
| 167 | if(basicType==DEF_OBJECT){
|
---|
| 168 | return PTR_SIZE;
|
---|
| 169 | }
|
---|
| 170 |
|
---|
[186] | 171 | SmoothieException::Throw();
|
---|
[172] | 172 |
|
---|
| 173 | return 0;
|
---|
| 174 | }
|
---|
| 175 |
|
---|
| 176 |
|
---|
| 177 | bool Type::Equals( const Type &type ) const
|
---|
| 178 | {
|
---|
| 179 | if( basicType == type.basicType ){
|
---|
| 180 | if( NATURAL_TYPE( basicType ) == DEF_OBJECT
|
---|
| 181 | || NATURAL_TYPE( basicType ) == DEF_STRUCT ){
|
---|
| 182 |
|
---|
| 183 | if( index == type.index ){
|
---|
| 184 | return true;
|
---|
| 185 | }
|
---|
| 186 |
|
---|
| 187 | }
|
---|
| 188 | else{
|
---|
| 189 | return true;
|
---|
| 190 | }
|
---|
| 191 | }
|
---|
| 192 | return false;
|
---|
| 193 | }
|
---|
| 194 |
|
---|
| 195 | int Type::GetBasicSize() const
|
---|
| 196 | {
|
---|
| 197 | return GetBasicSize( basicType );
|
---|
| 198 | }
|
---|
| 199 | int Type::GetSize() const
|
---|
| 200 | {
|
---|
| 201 |
|
---|
| 202 | // 基本型
|
---|
| 203 | switch( basicType ){
|
---|
| 204 | case DEF_LONG:
|
---|
| 205 | if(index==LITERAL_NULL||index==LITERAL_M128_0||index==LITERAL_0_255){
|
---|
| 206 | return sizeof(BYTE);
|
---|
| 207 | }
|
---|
| 208 | else if(index==LITERAL_M32768_0||index==LITERAL_0_65535){
|
---|
| 209 | return sizeof(WORD);
|
---|
| 210 | }
|
---|
| 211 | return sizeof(DWORD);
|
---|
| 212 |
|
---|
| 213 | case DEF_SBYTE:
|
---|
| 214 | case DEF_BYTE:
|
---|
| 215 | case DEF_BOOLEAN:
|
---|
| 216 | return sizeof(BYTE);
|
---|
| 217 |
|
---|
| 218 | case DEF_INTEGER:
|
---|
| 219 | case DEF_WORD:
|
---|
| 220 | return sizeof(WORD);
|
---|
| 221 |
|
---|
| 222 | case DEF_DWORD:
|
---|
| 223 | return sizeof(DWORD);
|
---|
| 224 |
|
---|
| 225 | case DEF_INT64:
|
---|
| 226 | case DEF_QWORD:
|
---|
| 227 | return sizeof(_int64);
|
---|
| 228 |
|
---|
| 229 | case DEF_DOUBLE:
|
---|
| 230 | return sizeof(double);
|
---|
| 231 | case DEF_SINGLE:
|
---|
| 232 | return sizeof(float);
|
---|
| 233 | }
|
---|
| 234 |
|
---|
| 235 | // ポインタ
|
---|
| 236 | if(IsPointer()){
|
---|
| 237 | return PTR_SIZE;
|
---|
| 238 | }
|
---|
| 239 |
|
---|
| 240 | // 構造体
|
---|
| 241 | if( basicType == DEF_STRUCT ){
|
---|
| 242 | if( !pClass ){
|
---|
[186] | 243 | SmoothieException::Throw();
|
---|
[172] | 244 | return 0;
|
---|
| 245 | }
|
---|
| 246 |
|
---|
| 247 | return pClass->GetSize();
|
---|
| 248 | }
|
---|
| 249 |
|
---|
| 250 | // オブジェクト
|
---|
| 251 | if(basicType==DEF_OBJECT){
|
---|
| 252 | if( GetClass().IsInterface() ){
|
---|
| 253 | // vtblOffsetのサイズを含める
|
---|
| 254 | return PTR_SIZE*2;
|
---|
| 255 | }
|
---|
| 256 | return PTR_SIZE;
|
---|
| 257 | }
|
---|
| 258 |
|
---|
[186] | 259 | SmoothieException::Throw();
|
---|
[172] | 260 | return 0;
|
---|
| 261 | }
|
---|
| 262 |
|
---|
| 263 | bool Type::IsNull() const{
|
---|
| 264 | if( basicType == DEF_NON ){
|
---|
| 265 | return true;
|
---|
| 266 | }
|
---|
| 267 | return false;
|
---|
| 268 | }
|
---|
| 269 |
|
---|
| 270 | bool Type::IsByte() const{
|
---|
| 271 | if( basicType == DEF_BYTE ){
|
---|
| 272 | return true;
|
---|
| 273 | }
|
---|
| 274 | return false;
|
---|
| 275 | }
|
---|
| 276 | bool Type::IsSByte() const{
|
---|
| 277 | if( basicType == DEF_SBYTE ){
|
---|
| 278 | return true;
|
---|
| 279 | }
|
---|
| 280 | return false;
|
---|
| 281 | }
|
---|
| 282 | bool Type::IsWord() const{
|
---|
| 283 | if( basicType == DEF_WORD ){
|
---|
| 284 | return true;
|
---|
| 285 | }
|
---|
| 286 | return false;
|
---|
| 287 | }
|
---|
| 288 | bool Type::IsInteger() const{
|
---|
| 289 | if( basicType == DEF_INTEGER ){
|
---|
| 290 | return true;
|
---|
| 291 | }
|
---|
| 292 | return false;
|
---|
| 293 | }
|
---|
| 294 | bool Type::IsDWord() const{
|
---|
| 295 | if( basicType == DEF_DWORD ){
|
---|
| 296 | return true;
|
---|
| 297 | }
|
---|
| 298 | return false;
|
---|
| 299 | }
|
---|
| 300 | bool Type::IsLong() const{
|
---|
| 301 | if( basicType == DEF_LONG ){
|
---|
| 302 | return true;
|
---|
| 303 | }
|
---|
| 304 | return false;
|
---|
| 305 | }
|
---|
| 306 | bool Type::IsQWord() const{
|
---|
| 307 | if( basicType == DEF_QWORD ){
|
---|
| 308 | return true;
|
---|
| 309 | }
|
---|
| 310 | return false;
|
---|
| 311 | }
|
---|
| 312 | bool Type::IsInt64() const{
|
---|
| 313 | if( basicType == DEF_INT64 ){
|
---|
| 314 | return true;
|
---|
| 315 | }
|
---|
| 316 | return false;
|
---|
| 317 | }
|
---|
| 318 | bool Type::IsSingle() const{
|
---|
| 319 | if( basicType == DEF_SINGLE ){
|
---|
| 320 | return true;
|
---|
| 321 | }
|
---|
| 322 | return false;
|
---|
| 323 | }
|
---|
| 324 | bool Type::IsDouble() const{
|
---|
| 325 | if( basicType == DEF_DOUBLE ){
|
---|
| 326 | return true;
|
---|
| 327 | }
|
---|
| 328 | return false;
|
---|
| 329 | }
|
---|
| 330 | bool Type::IsBoolean() const{
|
---|
| 331 | if( basicType == DEF_BOOLEAN ){
|
---|
| 332 | return true;
|
---|
| 333 | }
|
---|
| 334 | return false;
|
---|
| 335 | }
|
---|
| 336 |
|
---|
| 337 | bool Type::IsPointer( int basicType )
|
---|
| 338 | {
|
---|
| 339 | if(PTR_LEVEL( basicType )|| basicType == DEF_PTR_VOID || basicType == DEF_PTR_PROC
|
---|
| 340 | || ( basicType & FLAG_PTR ) ){
|
---|
| 341 | return true;
|
---|
| 342 | }
|
---|
| 343 |
|
---|
| 344 | return false;
|
---|
| 345 | }
|
---|
| 346 | bool Type::IsPointer() const
|
---|
| 347 | {
|
---|
| 348 | return IsPointer( basicType );
|
---|
| 349 | }
|
---|
| 350 | bool Type::IsSigned() const
|
---|
| 351 | {
|
---|
| 352 | switch( basicType ){
|
---|
| 353 | case DEF_SBYTE:
|
---|
| 354 | case DEF_INTEGER:
|
---|
| 355 | case DEF_LONG:
|
---|
| 356 | case DEF_INT64:
|
---|
| 357 | case DEF_SINGLE:
|
---|
| 358 | case DEF_DOUBLE:
|
---|
| 359 | return true;
|
---|
| 360 | default:
|
---|
| 361 | break;
|
---|
| 362 | }
|
---|
| 363 | return false;
|
---|
| 364 | }
|
---|
| 365 | bool Type::IsNaturalWhole() const
|
---|
| 366 | {
|
---|
| 367 | switch( basicType ){
|
---|
| 368 | case DEF_SBYTE:
|
---|
| 369 | case DEF_BYTE:
|
---|
| 370 | case DEF_INTEGER:
|
---|
| 371 | case DEF_WORD:
|
---|
| 372 | case DEF_LONG:
|
---|
| 373 | case DEF_DWORD:
|
---|
| 374 | case DEF_INT64:
|
---|
| 375 | case DEF_QWORD:
|
---|
| 376 | return true;
|
---|
| 377 | default:
|
---|
| 378 | break;
|
---|
| 379 | }
|
---|
| 380 | return false;
|
---|
| 381 | }
|
---|
| 382 | bool Type::IsWhole() const
|
---|
| 383 | {
|
---|
| 384 | return (
|
---|
| 385 | IsNaturalWhole()
|
---|
| 386 | || IsPointer( basicType )
|
---|
| 387 | || basicType == DEF_BOOLEAN
|
---|
| 388 | );
|
---|
| 389 | }
|
---|
| 390 | bool Type::IsReal() const
|
---|
| 391 | {
|
---|
| 392 | switch( basicType ){
|
---|
| 393 | case DEF_SINGLE:
|
---|
| 394 | case DEF_DOUBLE:
|
---|
| 395 | return true;
|
---|
| 396 | default:
|
---|
| 397 | break;
|
---|
| 398 | }
|
---|
| 399 | return false;
|
---|
| 400 | }
|
---|
| 401 | bool Type::Is64() const
|
---|
| 402 | {
|
---|
| 403 | switch( basicType ){
|
---|
| 404 | case DEF_QWORD:
|
---|
| 405 | case DEF_INT64:
|
---|
| 406 | return true;
|
---|
| 407 | default:
|
---|
| 408 | break;
|
---|
| 409 | }
|
---|
| 410 | return false;
|
---|
| 411 | }
|
---|
| 412 | bool Type::IsProcPtr() const
|
---|
| 413 | {
|
---|
| 414 | if( basicType == DEF_PTR_PROC ){
|
---|
| 415 | return true;
|
---|
| 416 | }
|
---|
| 417 | return false;
|
---|
| 418 | }
|
---|
| 419 | bool Type::IsStruct() const
|
---|
| 420 | {
|
---|
| 421 | if( basicType == DEF_STRUCT ){
|
---|
| 422 | return true;
|
---|
| 423 | }
|
---|
| 424 | return false;
|
---|
| 425 | }
|
---|
| 426 | bool Type::IsStructPtr() const
|
---|
| 427 | {
|
---|
| 428 | if( basicType == DEF_PTR_STRUCT ){
|
---|
| 429 | return true;
|
---|
| 430 | }
|
---|
| 431 | return false;
|
---|
| 432 | }
|
---|
| 433 | bool Type::IsObject() const
|
---|
| 434 | {
|
---|
| 435 | if( basicType == DEF_OBJECT ){
|
---|
| 436 | return true;
|
---|
| 437 | }
|
---|
| 438 | return false;
|
---|
| 439 | }
|
---|
| 440 | bool Type::IsObjectPtr() const
|
---|
| 441 | {
|
---|
| 442 | if( basicType == DEF_PTR_OBJECT ){
|
---|
| 443 | return true;
|
---|
| 444 | }
|
---|
| 445 | return false;
|
---|
| 446 | }
|
---|
| 447 | bool Type::IsObjectClass() const
|
---|
| 448 | {
|
---|
| 449 | if( basicType == DEF_OBJECT ){
|
---|
| 450 | if( pClass->GetName() == "Object" ){
|
---|
| 451 | return true;
|
---|
| 452 | }
|
---|
| 453 | }
|
---|
| 454 | return false;
|
---|
| 455 | }
|
---|
| 456 | bool Type::IsStringClass() const
|
---|
| 457 | {
|
---|
| 458 | if( basicType == DEF_OBJECT ){
|
---|
| 459 | if( pClass->GetName() == "String" ){
|
---|
| 460 | return true;
|
---|
| 461 | }
|
---|
| 462 | }
|
---|
| 463 | return false;
|
---|
| 464 | }
|
---|
| 465 | bool Type::IsVoidPtr() const
|
---|
| 466 | {
|
---|
| 467 | if( basicType == DEF_PTR_VOID ){
|
---|
| 468 | return true;
|
---|
| 469 | }
|
---|
| 470 | return false;
|
---|
| 471 | }
|
---|
| 472 |
|
---|
| 473 | bool Type::IsAny() const
|
---|
| 474 | {
|
---|
| 475 | if( basicType == DEF_ANY ){
|
---|
| 476 | return true;
|
---|
| 477 | }
|
---|
| 478 | return false;
|
---|
| 479 | }
|
---|
| 480 |
|
---|
| 481 | bool Type::HasMember() const
|
---|
| 482 | {
|
---|
| 483 | if( NATURAL_TYPE( basicType ) == DEF_OBJECT
|
---|
| 484 | || NATURAL_TYPE( basicType ) == DEF_STRUCT ){
|
---|
| 485 | return true;
|
---|
| 486 | }
|
---|
| 487 | return false;
|
---|
| 488 | }
|
---|
| 489 |
|
---|
[181] | 490 |
|
---|
[172] | 491 | const string Type::ToString() const
|
---|
| 492 | {
|
---|
| 493 | if( PTR_LEVEL( basicType ) ){
|
---|
| 494 | //ポインタレベルが1以上の場合
|
---|
| 495 | Type type( *this );
|
---|
| 496 | type.PtrLevelDown();
|
---|
| 497 |
|
---|
| 498 | return (string)"*" + type.ToString();
|
---|
| 499 | }
|
---|
| 500 | else if( IsObject() || IsStruct() ){
|
---|
| 501 | //オブジェクトまたは構造体
|
---|
| 502 |
|
---|
| 503 | if( !( index == 0 || index == -1 ) ){
|
---|
| 504 | if( pClass->GetNamespaceScopes().size() >= 1 )
|
---|
| 505 | {
|
---|
| 506 | return pClass->GetNamespaceScopes().ToString() + "." + pClass->GetName();
|
---|
| 507 | }
|
---|
| 508 | return pClass->GetName();
|
---|
| 509 | }
|
---|
| 510 | }
|
---|
| 511 | else if( IsProcPtr() ){
|
---|
| 512 | if( index == 0 || index == -1 ){
|
---|
| 513 | return "VoidPtr";
|
---|
| 514 | }
|
---|
| 515 | else{
|
---|
[181] | 516 | if( Smoothie::GetMeta().GetProcPointers()[index]->ReturnType().IsNull() ){
|
---|
[172] | 517 | return "*Sub";
|
---|
| 518 | }
|
---|
| 519 | return "*Function";
|
---|
| 520 | }
|
---|
| 521 | }
|
---|
| 522 | else{
|
---|
| 523 | // 基本型
|
---|
| 524 |
|
---|
| 525 | for( int i=0; ; i++ ){
|
---|
| 526 | if( basicTypeList[i] == DEF_NON ){
|
---|
| 527 | break;
|
---|
| 528 | }
|
---|
| 529 | if( basicTypeList[i] == basicType ){
|
---|
| 530 | return basicTypeNameList[i];
|
---|
| 531 | }
|
---|
| 532 | }
|
---|
| 533 | }
|
---|
| 534 |
|
---|
[186] | 535 | SmoothieException::Throw( 1 );
|
---|
[172] | 536 |
|
---|
| 537 | return (string)"(null)";
|
---|
| 538 | }
|
---|
| 539 |
|
---|
| 540 | Type Type::String(){
|
---|
[181] | 541 | return Type( DEF_OBJECT, *Smoothie::GetMeta().GetClasses().GetStringClassPtr() );
|
---|
| 542 | }
|
---|
[172] | 543 |
|
---|
[173] | 544 | int Type::GetBasicTypeFromSimpleName( const char *variable ){
|
---|
| 545 | extern char DefIntVari[26],DefSngVari[26],DefStrVari[26],divNum,dsvNum,dStrvNum;
|
---|
| 546 | int i;
|
---|
| 547 | char name[VN_SIZE];
|
---|
| 548 |
|
---|
| 549 | //構造体メンバの場合を考慮
|
---|
| 550 | for(i=lstrlen(variable);i>0;i--){
|
---|
| 551 | if(variable[i]=='.'){
|
---|
| 552 | i++;
|
---|
| 553 | break;
|
---|
| 554 | }
|
---|
| 555 | }
|
---|
| 556 |
|
---|
| 557 | for(;;i++){
|
---|
| 558 | if(variable[i]=='('||variable[i]=='\0'){
|
---|
| 559 | name[i]=0;
|
---|
| 560 | break;
|
---|
| 561 | }
|
---|
| 562 | name[i]=variable[i];
|
---|
| 563 | }
|
---|
| 564 | //変数名から選択
|
---|
| 565 | i--;
|
---|
| 566 | if(name[i]=='#') return DEF_DOUBLE;
|
---|
| 567 | if(name[i]=='!') return DEF_SINGLE;
|
---|
| 568 | if(name[i]=='%') return DEF_INTEGER;
|
---|
| 569 | return DEF_DOUBLE;
|
---|
| 570 | }
|
---|
| 571 |
|
---|
| 572 |
|
---|
[172] | 573 | const string BlittableType::GetCreateStaticMethodFullName() const
|
---|
| 574 | {
|
---|
| 575 | return pClass->GetNamespaceScopes().ToString() + "." + pClass->GetName() + "._Create";
|
---|
| 576 | }
|
---|