diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llmessage/message.cpp | 163 |
1 files changed, 75 insertions, 88 deletions
diff --git a/linden/indra/llmessage/message.cpp b/linden/indra/llmessage/message.cpp index ee295d7..c572341 100644 --- a/linden/indra/llmessage/message.cpp +++ b/linden/indra/llmessage/message.cpp | |||
@@ -201,7 +201,7 @@ void LLMessageHandlerBridge::post(LLHTTPNode::ResponsePtr response, | |||
201 | const LLSD& context, const LLSD& input) const | 201 | const LLSD& context, const LLSD& input) const |
202 | { | 202 | { |
203 | std::string name = context["request"]["wildcard"]["message-name"]; | 203 | std::string name = context["request"]["wildcard"]["message-name"]; |
204 | char* namePtr = gMessageStringTable.getString(name.c_str()); | 204 | char* namePtr = LLMessageStringTable::getInstance()->getString(name.c_str()); |
205 | 205 | ||
206 | lldebugs << "Setting mLastSender " << input["sender"].asString() << llendl; | 206 | lldebugs << "Setting mLastSender " << input["sender"].asString() << llendl; |
207 | gMessageSystem->mLastSender = LLHost(input["sender"].asString()); | 207 | gMessageSystem->mLastSender = LLHost(input["sender"].asString()); |
@@ -469,7 +469,7 @@ static LLMessageSystem::message_template_name_map_t::const_iterator | |||
469 | findTemplate(const LLMessageSystem::message_template_name_map_t& templates, | 469 | findTemplate(const LLMessageSystem::message_template_name_map_t& templates, |
470 | std::string name) | 470 | std::string name) |
471 | { | 471 | { |
472 | const char* namePrehash = gMessageStringTable.getString(name.c_str()); | 472 | const char* namePrehash = LLMessageStringTable::getInstance()->getString(name.c_str()); |
473 | if(NULL == namePrehash) {return templates.end();} | 473 | if(NULL == namePrehash) {return templates.end();} |
474 | return templates.find(namePrehash); | 474 | return templates.find(namePrehash); |
475 | } | 475 | } |
@@ -770,7 +770,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count ) | |||
770 | /* Code for dumping the complete contents of a message. Keep for future use in optimizing messages. | 770 | /* Code for dumping the complete contents of a message. Keep for future use in optimizing messages. |
771 | if( 1 ) | 771 | if( 1 ) |
772 | { | 772 | { |
773 | static char* object_update = gMessageStringTable.getString("ObjectUpdate"); | 773 | static char* object_update = LLMessageStringTable::getInstance()->getString("ObjectUpdate"); |
774 | if(object_update == mTemplateMessageReader->getMessageName() ) | 774 | if(object_update == mTemplateMessageReader->getMessageName() ) |
775 | { | 775 | { |
776 | llinfos << "ObjectUpdate:" << llendl; | 776 | llinfos << "ObjectUpdate:" << llendl; |
@@ -1018,7 +1018,7 @@ BOOL LLMessageSystem::isSendFull(const char* blockname) | |||
1018 | char* stringTableName = NULL; | 1018 | char* stringTableName = NULL; |
1019 | if(NULL != blockname) | 1019 | if(NULL != blockname) |
1020 | { | 1020 | { |
1021 | stringTableName = gMessageStringTable.getString(blockname); | 1021 | stringTableName = LLMessageStringTable::getInstance()->getString(blockname); |
1022 | } | 1022 | } |
1023 | return isSendFullFast(stringTableName); | 1023 | return isSendFullFast(stringTableName); |
1024 | } | 1024 | } |
@@ -2139,7 +2139,7 @@ void LLMessageSystem::dispatch( | |||
2139 | LLHTTPNode::ResponsePtr responsep) | 2139 | LLHTTPNode::ResponsePtr responsep) |
2140 | { | 2140 | { |
2141 | if ((gMessageSystem->mMessageTemplates.find | 2141 | if ((gMessageSystem->mMessageTemplates.find |
2142 | (gMessageStringTable.getString(msg_name.c_str())) == | 2142 | (LLMessageStringTable::getInstance()->getString(msg_name.c_str())) == |
2143 | gMessageSystem->mMessageTemplates.end()) && | 2143 | gMessageSystem->mMessageTemplates.end()) && |
2144 | !LLMessageConfig::isValidMessage(msg_name)) | 2144 | !LLMessageConfig::isValidMessage(msg_name)) |
2145 | { | 2145 | { |
@@ -2173,7 +2173,7 @@ static void check_for_unrecognized_messages( | |||
2173 | end = map.endMap(); | 2173 | end = map.endMap(); |
2174 | iter != end; ++iter) | 2174 | iter != end; ++iter) |
2175 | { | 2175 | { |
2176 | const char* name = gMessageStringTable.getString(iter->first.c_str()); | 2176 | const char* name = LLMessageStringTable::getInstance()->getString(iter->first.c_str()); |
2177 | 2177 | ||
2178 | if (templates.find(name) == templates.end()) | 2178 | if (templates.find(name) == templates.end()) |
2179 | { | 2179 | { |
@@ -2441,13 +2441,11 @@ void dump_prehash_files() | |||
2441 | fprintf(fp, "\n\nextern F32 gPrehashVersionNumber;\n\n"); | 2441 | fprintf(fp, "\n\nextern F32 gPrehashVersionNumber;\n\n"); |
2442 | for (i = 0; i < MESSAGE_NUMBER_OF_HASH_BUCKETS; i++) | 2442 | for (i = 0; i < MESSAGE_NUMBER_OF_HASH_BUCKETS; i++) |
2443 | { | 2443 | { |
2444 | if (!gMessageStringTable.mEmpty[i] && gMessageStringTable.mString[i][0] != '.') | 2444 | if (!LLMessageStringTable::getInstance()->mEmpty[i] && LLMessageStringTable::getInstance()->mString[i][0] != '.') |
2445 | { | 2445 | { |
2446 | fprintf(fp, "extern char * _PREHASH_%s;\n", gMessageStringTable.mString[i]); | 2446 | fprintf(fp, "extern char * _PREHASH_%s;\n", LLMessageStringTable::getInstance()->mString[i]); |
2447 | } | 2447 | } |
2448 | } | 2448 | } |
2449 | fprintf(fp, "\n\nvoid init_prehash_data();\n\n"); | ||
2450 | fprintf(fp, "\n\n"); | ||
2451 | fprintf(fp, "\n\n#endif\n"); | 2449 | fprintf(fp, "\n\n#endif\n"); |
2452 | fclose(fp); | 2450 | fclose(fp); |
2453 | } | 2451 | } |
@@ -2472,21 +2470,11 @@ void dump_prehash_files() | |||
2472 | fprintf(fp, "\n\nF32 gPrehashVersionNumber = %.3ff;\n\n", gMessageSystem->mMessageFileVersionNumber); | 2470 | fprintf(fp, "\n\nF32 gPrehashVersionNumber = %.3ff;\n\n", gMessageSystem->mMessageFileVersionNumber); |
2473 | for (i = 0; i < MESSAGE_NUMBER_OF_HASH_BUCKETS; i++) | 2471 | for (i = 0; i < MESSAGE_NUMBER_OF_HASH_BUCKETS; i++) |
2474 | { | 2472 | { |
2475 | if (!gMessageStringTable.mEmpty[i] && gMessageStringTable.mString[i][0] != '.') | 2473 | if (!LLMessageStringTable::getInstance()->mEmpty[i] && LLMessageStringTable::getInstance()->mString[i][0] != '.') |
2476 | { | 2474 | { |
2477 | fprintf(fp, "char * _PREHASH_%s;\n", gMessageStringTable.mString[i]); | 2475 | fprintf(fp, "char * _PREHASH_%s = LLMessageStringTable::getInstance()->getString(\"%s\");\n", LLMessageStringTable::getInstance()->mString[i], LLMessageStringTable::getInstance()->mString[i]); |
2478 | } | 2476 | } |
2479 | } | 2477 | } |
2480 | fprintf(fp, "\nvoid init_prehash_data()\n"); | ||
2481 | fprintf(fp, "{\n"); | ||
2482 | for (i = 0; i < MESSAGE_NUMBER_OF_HASH_BUCKETS; i++) | ||
2483 | { | ||
2484 | if (!gMessageStringTable.mEmpty[i] && gMessageStringTable.mString[i][0] != '.') | ||
2485 | { | ||
2486 | fprintf(fp, "\t_PREHASH_%s = gMessageStringTable.getString(\"%s\");\n", gMessageStringTable.mString[i], gMessageStringTable.mString[i]); | ||
2487 | } | ||
2488 | } | ||
2489 | fprintf(fp, "}\n"); | ||
2490 | fclose(fp); | 2478 | fclose(fp); |
2491 | } | 2479 | } |
2492 | } | 2480 | } |
@@ -2528,7 +2516,6 @@ BOOL start_messaging_system( | |||
2528 | } | 2516 | } |
2529 | else | 2517 | else |
2530 | { | 2518 | { |
2531 | init_prehash_data(); | ||
2532 | if (gMessageSystem->mMessageFileVersionNumber != gPrehashVersionNumber) | 2519 | if (gMessageSystem->mMessageFileVersionNumber != gPrehashVersionNumber) |
2533 | { | 2520 | { |
2534 | llinfos << "Message template version does not match prehash version number" << llendl; | 2521 | llinfos << "Message template version does not match prehash version number" << llendl; |
@@ -2991,7 +2978,7 @@ void LLMessageSystem::setHandlerFuncFast(const char *name, void (*handler_func)( | |||
2991 | bool LLMessageSystem::callHandler(const char *name, | 2978 | bool LLMessageSystem::callHandler(const char *name, |
2992 | bool trustedSource, LLMessageSystem* msg) | 2979 | bool trustedSource, LLMessageSystem* msg) |
2993 | { | 2980 | { |
2994 | name = gMessageStringTable.getString(name); | 2981 | name = LLMessageStringTable::getInstance()->getString(name); |
2995 | message_template_name_map_t::const_iterator iter; | 2982 | message_template_name_map_t::const_iterator iter; |
2996 | iter = mMessageTemplates.find(name); | 2983 | iter = mMessageTemplates.find(name); |
2997 | if(iter == mMessageTemplates.end()) | 2984 | if(iter == mMessageTemplates.end()) |
@@ -3474,7 +3461,7 @@ void LLMessageSystem::newMessageFast(const char *name) | |||
3474 | 3461 | ||
3475 | void LLMessageSystem::newMessage(const char *name) | 3462 | void LLMessageSystem::newMessage(const char *name) |
3476 | { | 3463 | { |
3477 | newMessageFast(gMessageStringTable.getString(name)); | 3464 | newMessageFast(LLMessageStringTable::getInstance()->getString(name)); |
3478 | } | 3465 | } |
3479 | 3466 | ||
3480 | void LLMessageSystem::addBinaryDataFast(const char *varname, const void *data, S32 size) | 3467 | void LLMessageSystem::addBinaryDataFast(const char *varname, const void *data, S32 size) |
@@ -3484,7 +3471,7 @@ void LLMessageSystem::addBinaryDataFast(const char *varname, const void *data, S | |||
3484 | 3471 | ||
3485 | void LLMessageSystem::addBinaryData(const char *varname, const void *data, S32 size) | 3472 | void LLMessageSystem::addBinaryData(const char *varname, const void *data, S32 size) |
3486 | { | 3473 | { |
3487 | mMessageBuilder->addBinaryData(gMessageStringTable.getString(varname),data, size); | 3474 | mMessageBuilder->addBinaryData(LLMessageStringTable::getInstance()->getString(varname),data, size); |
3488 | } | 3475 | } |
3489 | 3476 | ||
3490 | void LLMessageSystem::addS8Fast(const char *varname, S8 v) | 3477 | void LLMessageSystem::addS8Fast(const char *varname, S8 v) |
@@ -3494,7 +3481,7 @@ void LLMessageSystem::addS8Fast(const char *varname, S8 v) | |||
3494 | 3481 | ||
3495 | void LLMessageSystem::addS8(const char *varname, S8 v) | 3482 | void LLMessageSystem::addS8(const char *varname, S8 v) |
3496 | { | 3483 | { |
3497 | mMessageBuilder->addS8(gMessageStringTable.getString(varname), v); | 3484 | mMessageBuilder->addS8(LLMessageStringTable::getInstance()->getString(varname), v); |
3498 | } | 3485 | } |
3499 | 3486 | ||
3500 | void LLMessageSystem::addU8Fast(const char *varname, U8 v) | 3487 | void LLMessageSystem::addU8Fast(const char *varname, U8 v) |
@@ -3504,7 +3491,7 @@ void LLMessageSystem::addU8Fast(const char *varname, U8 v) | |||
3504 | 3491 | ||
3505 | void LLMessageSystem::addU8(const char *varname, U8 v) | 3492 | void LLMessageSystem::addU8(const char *varname, U8 v) |
3506 | { | 3493 | { |
3507 | mMessageBuilder->addU8(gMessageStringTable.getString(varname), v); | 3494 | mMessageBuilder->addU8(LLMessageStringTable::getInstance()->getString(varname), v); |
3508 | } | 3495 | } |
3509 | 3496 | ||
3510 | void LLMessageSystem::addS16Fast(const char *varname, S16 v) | 3497 | void LLMessageSystem::addS16Fast(const char *varname, S16 v) |
@@ -3514,7 +3501,7 @@ void LLMessageSystem::addS16Fast(const char *varname, S16 v) | |||
3514 | 3501 | ||
3515 | void LLMessageSystem::addS16(const char *varname, S16 v) | 3502 | void LLMessageSystem::addS16(const char *varname, S16 v) |
3516 | { | 3503 | { |
3517 | mMessageBuilder->addS16(gMessageStringTable.getString(varname), v); | 3504 | mMessageBuilder->addS16(LLMessageStringTable::getInstance()->getString(varname), v); |
3518 | } | 3505 | } |
3519 | 3506 | ||
3520 | void LLMessageSystem::addU16Fast(const char *varname, U16 v) | 3507 | void LLMessageSystem::addU16Fast(const char *varname, U16 v) |
@@ -3524,7 +3511,7 @@ void LLMessageSystem::addU16Fast(const char *varname, U16 v) | |||
3524 | 3511 | ||
3525 | void LLMessageSystem::addU16(const char *varname, U16 v) | 3512 | void LLMessageSystem::addU16(const char *varname, U16 v) |
3526 | { | 3513 | { |
3527 | mMessageBuilder->addU16(gMessageStringTable.getString(varname), v); | 3514 | mMessageBuilder->addU16(LLMessageStringTable::getInstance()->getString(varname), v); |
3528 | } | 3515 | } |
3529 | 3516 | ||
3530 | void LLMessageSystem::addF32Fast(const char *varname, F32 v) | 3517 | void LLMessageSystem::addF32Fast(const char *varname, F32 v) |
@@ -3534,7 +3521,7 @@ void LLMessageSystem::addF32Fast(const char *varname, F32 v) | |||
3534 | 3521 | ||
3535 | void LLMessageSystem::addF32(const char *varname, F32 v) | 3522 | void LLMessageSystem::addF32(const char *varname, F32 v) |
3536 | { | 3523 | { |
3537 | mMessageBuilder->addF32(gMessageStringTable.getString(varname), v); | 3524 | mMessageBuilder->addF32(LLMessageStringTable::getInstance()->getString(varname), v); |
3538 | } | 3525 | } |
3539 | 3526 | ||
3540 | void LLMessageSystem::addS32Fast(const char *varname, S32 v) | 3527 | void LLMessageSystem::addS32Fast(const char *varname, S32 v) |
@@ -3544,7 +3531,7 @@ void LLMessageSystem::addS32Fast(const char *varname, S32 v) | |||
3544 | 3531 | ||
3545 | void LLMessageSystem::addS32(const char *varname, S32 v) | 3532 | void LLMessageSystem::addS32(const char *varname, S32 v) |
3546 | { | 3533 | { |
3547 | mMessageBuilder->addS32(gMessageStringTable.getString(varname), v); | 3534 | mMessageBuilder->addS32(LLMessageStringTable::getInstance()->getString(varname), v); |
3548 | } | 3535 | } |
3549 | 3536 | ||
3550 | void LLMessageSystem::addU32Fast(const char *varname, U32 v) | 3537 | void LLMessageSystem::addU32Fast(const char *varname, U32 v) |
@@ -3554,7 +3541,7 @@ void LLMessageSystem::addU32Fast(const char *varname, U32 v) | |||
3554 | 3541 | ||
3555 | void LLMessageSystem::addU32(const char *varname, U32 v) | 3542 | void LLMessageSystem::addU32(const char *varname, U32 v) |
3556 | { | 3543 | { |
3557 | mMessageBuilder->addU32(gMessageStringTable.getString(varname), v); | 3544 | mMessageBuilder->addU32(LLMessageStringTable::getInstance()->getString(varname), v); |
3558 | } | 3545 | } |
3559 | 3546 | ||
3560 | void LLMessageSystem::addU64Fast(const char *varname, U64 v) | 3547 | void LLMessageSystem::addU64Fast(const char *varname, U64 v) |
@@ -3564,7 +3551,7 @@ void LLMessageSystem::addU64Fast(const char *varname, U64 v) | |||
3564 | 3551 | ||
3565 | void LLMessageSystem::addU64(const char *varname, U64 v) | 3552 | void LLMessageSystem::addU64(const char *varname, U64 v) |
3566 | { | 3553 | { |
3567 | mMessageBuilder->addU64(gMessageStringTable.getString(varname), v); | 3554 | mMessageBuilder->addU64(LLMessageStringTable::getInstance()->getString(varname), v); |
3568 | } | 3555 | } |
3569 | 3556 | ||
3570 | void LLMessageSystem::addF64Fast(const char *varname, F64 v) | 3557 | void LLMessageSystem::addF64Fast(const char *varname, F64 v) |
@@ -3574,7 +3561,7 @@ void LLMessageSystem::addF64Fast(const char *varname, F64 v) | |||
3574 | 3561 | ||
3575 | void LLMessageSystem::addF64(const char *varname, F64 v) | 3562 | void LLMessageSystem::addF64(const char *varname, F64 v) |
3576 | { | 3563 | { |
3577 | mMessageBuilder->addF64(gMessageStringTable.getString(varname), v); | 3564 | mMessageBuilder->addF64(LLMessageStringTable::getInstance()->getString(varname), v); |
3578 | } | 3565 | } |
3579 | 3566 | ||
3580 | void LLMessageSystem::addIPAddrFast(const char *varname, U32 v) | 3567 | void LLMessageSystem::addIPAddrFast(const char *varname, U32 v) |
@@ -3584,7 +3571,7 @@ void LLMessageSystem::addIPAddrFast(const char *varname, U32 v) | |||
3584 | 3571 | ||
3585 | void LLMessageSystem::addIPAddr(const char *varname, U32 v) | 3572 | void LLMessageSystem::addIPAddr(const char *varname, U32 v) |
3586 | { | 3573 | { |
3587 | mMessageBuilder->addIPAddr(gMessageStringTable.getString(varname), v); | 3574 | mMessageBuilder->addIPAddr(LLMessageStringTable::getInstance()->getString(varname), v); |
3588 | } | 3575 | } |
3589 | 3576 | ||
3590 | void LLMessageSystem::addIPPortFast(const char *varname, U16 v) | 3577 | void LLMessageSystem::addIPPortFast(const char *varname, U16 v) |
@@ -3594,7 +3581,7 @@ void LLMessageSystem::addIPPortFast(const char *varname, U16 v) | |||
3594 | 3581 | ||
3595 | void LLMessageSystem::addIPPort(const char *varname, U16 v) | 3582 | void LLMessageSystem::addIPPort(const char *varname, U16 v) |
3596 | { | 3583 | { |
3597 | mMessageBuilder->addIPPort(gMessageStringTable.getString(varname), v); | 3584 | mMessageBuilder->addIPPort(LLMessageStringTable::getInstance()->getString(varname), v); |
3598 | } | 3585 | } |
3599 | 3586 | ||
3600 | void LLMessageSystem::addBOOLFast(const char* varname, BOOL v) | 3587 | void LLMessageSystem::addBOOLFast(const char* varname, BOOL v) |
@@ -3604,7 +3591,7 @@ void LLMessageSystem::addBOOLFast(const char* varname, BOOL v) | |||
3604 | 3591 | ||
3605 | void LLMessageSystem::addBOOL(const char* varname, BOOL v) | 3592 | void LLMessageSystem::addBOOL(const char* varname, BOOL v) |
3606 | { | 3593 | { |
3607 | mMessageBuilder->addBOOL(gMessageStringTable.getString(varname), v); | 3594 | mMessageBuilder->addBOOL(LLMessageStringTable::getInstance()->getString(varname), v); |
3608 | } | 3595 | } |
3609 | 3596 | ||
3610 | void LLMessageSystem::addStringFast(const char* varname, const char* v) | 3597 | void LLMessageSystem::addStringFast(const char* varname, const char* v) |
@@ -3614,7 +3601,7 @@ void LLMessageSystem::addStringFast(const char* varname, const char* v) | |||
3614 | 3601 | ||
3615 | void LLMessageSystem::addString(const char* varname, const char* v) | 3602 | void LLMessageSystem::addString(const char* varname, const char* v) |
3616 | { | 3603 | { |
3617 | mMessageBuilder->addString(gMessageStringTable.getString(varname), v); | 3604 | mMessageBuilder->addString(LLMessageStringTable::getInstance()->getString(varname), v); |
3618 | } | 3605 | } |
3619 | 3606 | ||
3620 | void LLMessageSystem::addStringFast(const char* varname, const std::string& v) | 3607 | void LLMessageSystem::addStringFast(const char* varname, const std::string& v) |
@@ -3624,7 +3611,7 @@ void LLMessageSystem::addStringFast(const char* varname, const std::string& v) | |||
3624 | 3611 | ||
3625 | void LLMessageSystem::addString(const char* varname, const std::string& v) | 3612 | void LLMessageSystem::addString(const char* varname, const std::string& v) |
3626 | { | 3613 | { |
3627 | mMessageBuilder->addString(gMessageStringTable.getString(varname), v); | 3614 | mMessageBuilder->addString(LLMessageStringTable::getInstance()->getString(varname), v); |
3628 | } | 3615 | } |
3629 | 3616 | ||
3630 | void LLMessageSystem::addVector3Fast(const char *varname, const LLVector3& v) | 3617 | void LLMessageSystem::addVector3Fast(const char *varname, const LLVector3& v) |
@@ -3634,7 +3621,7 @@ void LLMessageSystem::addVector3Fast(const char *varname, const LLVector3& v) | |||
3634 | 3621 | ||
3635 | void LLMessageSystem::addVector3(const char *varname, const LLVector3& v) | 3622 | void LLMessageSystem::addVector3(const char *varname, const LLVector3& v) |
3636 | { | 3623 | { |
3637 | mMessageBuilder->addVector3(gMessageStringTable.getString(varname), v); | 3624 | mMessageBuilder->addVector3(LLMessageStringTable::getInstance()->getString(varname), v); |
3638 | } | 3625 | } |
3639 | 3626 | ||
3640 | void LLMessageSystem::addVector4Fast(const char *varname, const LLVector4& v) | 3627 | void LLMessageSystem::addVector4Fast(const char *varname, const LLVector4& v) |
@@ -3644,7 +3631,7 @@ void LLMessageSystem::addVector4Fast(const char *varname, const LLVector4& v) | |||
3644 | 3631 | ||
3645 | void LLMessageSystem::addVector4(const char *varname, const LLVector4& v) | 3632 | void LLMessageSystem::addVector4(const char *varname, const LLVector4& v) |
3646 | { | 3633 | { |
3647 | mMessageBuilder->addVector4(gMessageStringTable.getString(varname), v); | 3634 | mMessageBuilder->addVector4(LLMessageStringTable::getInstance()->getString(varname), v); |
3648 | } | 3635 | } |
3649 | 3636 | ||
3650 | void LLMessageSystem::addVector3dFast(const char *varname, const LLVector3d& v) | 3637 | void LLMessageSystem::addVector3dFast(const char *varname, const LLVector3d& v) |
@@ -3654,7 +3641,7 @@ void LLMessageSystem::addVector3dFast(const char *varname, const LLVector3d& v) | |||
3654 | 3641 | ||
3655 | void LLMessageSystem::addVector3d(const char *varname, const LLVector3d& v) | 3642 | void LLMessageSystem::addVector3d(const char *varname, const LLVector3d& v) |
3656 | { | 3643 | { |
3657 | mMessageBuilder->addVector3d(gMessageStringTable.getString(varname), v); | 3644 | mMessageBuilder->addVector3d(LLMessageStringTable::getInstance()->getString(varname), v); |
3658 | } | 3645 | } |
3659 | 3646 | ||
3660 | void LLMessageSystem::addQuatFast(const char *varname, const LLQuaternion& v) | 3647 | void LLMessageSystem::addQuatFast(const char *varname, const LLQuaternion& v) |
@@ -3664,7 +3651,7 @@ void LLMessageSystem::addQuatFast(const char *varname, const LLQuaternion& v) | |||
3664 | 3651 | ||
3665 | void LLMessageSystem::addQuat(const char *varname, const LLQuaternion& v) | 3652 | void LLMessageSystem::addQuat(const char *varname, const LLQuaternion& v) |
3666 | { | 3653 | { |
3667 | mMessageBuilder->addQuat(gMessageStringTable.getString(varname), v); | 3654 | mMessageBuilder->addQuat(LLMessageStringTable::getInstance()->getString(varname), v); |
3668 | } | 3655 | } |
3669 | 3656 | ||
3670 | 3657 | ||
@@ -3675,7 +3662,7 @@ void LLMessageSystem::addUUIDFast(const char *varname, const LLUUID& v) | |||
3675 | 3662 | ||
3676 | void LLMessageSystem::addUUID(const char *varname, const LLUUID& v) | 3663 | void LLMessageSystem::addUUID(const char *varname, const LLUUID& v) |
3677 | { | 3664 | { |
3678 | mMessageBuilder->addUUID(gMessageStringTable.getString(varname), v); | 3665 | mMessageBuilder->addUUID(LLMessageStringTable::getInstance()->getString(varname), v); |
3679 | } | 3666 | } |
3680 | 3667 | ||
3681 | S32 LLMessageSystem::getCurrentSendTotal() const | 3668 | S32 LLMessageSystem::getCurrentSendTotal() const |
@@ -3692,8 +3679,8 @@ void LLMessageSystem::getS8Fast(const char *block, const char *var, S8 &u, | |||
3692 | void LLMessageSystem::getS8(const char *block, const char *var, S8 &u, | 3679 | void LLMessageSystem::getS8(const char *block, const char *var, S8 &u, |
3693 | S32 blocknum) | 3680 | S32 blocknum) |
3694 | { | 3681 | { |
3695 | getS8Fast(gMessageStringTable.getString(block), | 3682 | getS8Fast(LLMessageStringTable::getInstance()->getString(block), |
3696 | gMessageStringTable.getString(var), u, blocknum); | 3683 | LLMessageStringTable::getInstance()->getString(var), u, blocknum); |
3697 | } | 3684 | } |
3698 | 3685 | ||
3699 | void LLMessageSystem::getU8Fast(const char *block, const char *var, U8 &u, | 3686 | void LLMessageSystem::getU8Fast(const char *block, const char *var, U8 &u, |
@@ -3705,8 +3692,8 @@ void LLMessageSystem::getU8Fast(const char *block, const char *var, U8 &u, | |||
3705 | void LLMessageSystem::getU8(const char *block, const char *var, U8 &u, | 3692 | void LLMessageSystem::getU8(const char *block, const char *var, U8 &u, |
3706 | S32 blocknum) | 3693 | S32 blocknum) |
3707 | { | 3694 | { |
3708 | getU8Fast(gMessageStringTable.getString(block), | 3695 | getU8Fast(LLMessageStringTable::getInstance()->getString(block), |
3709 | gMessageStringTable.getString(var), u, blocknum); | 3696 | LLMessageStringTable::getInstance()->getString(var), u, blocknum); |
3710 | } | 3697 | } |
3711 | 3698 | ||
3712 | void LLMessageSystem::getBOOLFast(const char *block, const char *var, BOOL &b, | 3699 | void LLMessageSystem::getBOOLFast(const char *block, const char *var, BOOL &b, |
@@ -3718,8 +3705,8 @@ void LLMessageSystem::getBOOLFast(const char *block, const char *var, BOOL &b, | |||
3718 | void LLMessageSystem::getBOOL(const char *block, const char *var, BOOL &b, | 3705 | void LLMessageSystem::getBOOL(const char *block, const char *var, BOOL &b, |
3719 | S32 blocknum) | 3706 | S32 blocknum) |
3720 | { | 3707 | { |
3721 | getBOOLFast(gMessageStringTable.getString(block), | 3708 | getBOOLFast(LLMessageStringTable::getInstance()->getString(block), |
3722 | gMessageStringTable.getString(var), b, blocknum); | 3709 | LLMessageStringTable::getInstance()->getString(var), b, blocknum); |
3723 | } | 3710 | } |
3724 | 3711 | ||
3725 | void LLMessageSystem::getS16Fast(const char *block, const char *var, S16 &d, | 3712 | void LLMessageSystem::getS16Fast(const char *block, const char *var, S16 &d, |
@@ -3731,8 +3718,8 @@ void LLMessageSystem::getS16Fast(const char *block, const char *var, S16 &d, | |||
3731 | void LLMessageSystem::getS16(const char *block, const char *var, S16 &d, | 3718 | void LLMessageSystem::getS16(const char *block, const char *var, S16 &d, |
3732 | S32 blocknum) | 3719 | S32 blocknum) |
3733 | { | 3720 | { |
3734 | getS16Fast(gMessageStringTable.getString(block), | 3721 | getS16Fast(LLMessageStringTable::getInstance()->getString(block), |
3735 | gMessageStringTable.getString(var), d, blocknum); | 3722 | LLMessageStringTable::getInstance()->getString(var), d, blocknum); |
3736 | } | 3723 | } |
3737 | 3724 | ||
3738 | void LLMessageSystem::getU16Fast(const char *block, const char *var, U16 &d, | 3725 | void LLMessageSystem::getU16Fast(const char *block, const char *var, U16 &d, |
@@ -3744,8 +3731,8 @@ void LLMessageSystem::getU16Fast(const char *block, const char *var, U16 &d, | |||
3744 | void LLMessageSystem::getU16(const char *block, const char *var, U16 &d, | 3731 | void LLMessageSystem::getU16(const char *block, const char *var, U16 &d, |
3745 | S32 blocknum) | 3732 | S32 blocknum) |
3746 | { | 3733 | { |
3747 | getU16Fast(gMessageStringTable.getString(block), | 3734 | getU16Fast(LLMessageStringTable::getInstance()->getString(block), |
3748 | gMessageStringTable.getString(var), d, blocknum); | 3735 | LLMessageStringTable::getInstance()->getString(var), d, blocknum); |
3749 | } | 3736 | } |
3750 | 3737 | ||
3751 | void LLMessageSystem::getS32Fast(const char *block, const char *var, S32 &d, | 3738 | void LLMessageSystem::getS32Fast(const char *block, const char *var, S32 &d, |
@@ -3757,8 +3744,8 @@ void LLMessageSystem::getS32Fast(const char *block, const char *var, S32 &d, | |||
3757 | void LLMessageSystem::getS32(const char *block, const char *var, S32 &d, | 3744 | void LLMessageSystem::getS32(const char *block, const char *var, S32 &d, |
3758 | S32 blocknum) | 3745 | S32 blocknum) |
3759 | { | 3746 | { |
3760 | getS32Fast(gMessageStringTable.getString(block), | 3747 | getS32Fast(LLMessageStringTable::getInstance()->getString(block), |
3761 | gMessageStringTable.getString(var), d, blocknum); | 3748 | LLMessageStringTable::getInstance()->getString(var), d, blocknum); |
3762 | } | 3749 | } |
3763 | 3750 | ||
3764 | void LLMessageSystem::getU32Fast(const char *block, const char *var, U32 &d, | 3751 | void LLMessageSystem::getU32Fast(const char *block, const char *var, U32 &d, |
@@ -3770,8 +3757,8 @@ void LLMessageSystem::getU32Fast(const char *block, const char *var, U32 &d, | |||
3770 | void LLMessageSystem::getU32(const char *block, const char *var, U32 &d, | 3757 | void LLMessageSystem::getU32(const char *block, const char *var, U32 &d, |
3771 | S32 blocknum) | 3758 | S32 blocknum) |
3772 | { | 3759 | { |
3773 | getU32Fast(gMessageStringTable.getString(block), | 3760 | getU32Fast(LLMessageStringTable::getInstance()->getString(block), |
3774 | gMessageStringTable.getString(var), d, blocknum); | 3761 | LLMessageStringTable::getInstance()->getString(var), d, blocknum); |
3775 | } | 3762 | } |
3776 | 3763 | ||
3777 | void LLMessageSystem::getU64Fast(const char *block, const char *var, U64 &d, | 3764 | void LLMessageSystem::getU64Fast(const char *block, const char *var, U64 &d, |
@@ -3784,8 +3771,8 @@ void LLMessageSystem::getU64(const char *block, const char *var, U64 &d, | |||
3784 | S32 blocknum) | 3771 | S32 blocknum) |
3785 | { | 3772 | { |
3786 | 3773 | ||
3787 | getU64Fast(gMessageStringTable.getString(block), | 3774 | getU64Fast(LLMessageStringTable::getInstance()->getString(block), |
3788 | gMessageStringTable.getString(var), d, blocknum); | 3775 | LLMessageStringTable::getInstance()->getString(var), d, blocknum); |
3789 | } | 3776 | } |
3790 | 3777 | ||
3791 | void LLMessageSystem::getBinaryDataFast(const char *blockname, | 3778 | void LLMessageSystem::getBinaryDataFast(const char *blockname, |
@@ -3802,8 +3789,8 @@ void LLMessageSystem::getBinaryData(const char *blockname, | |||
3802 | void *datap, S32 size, | 3789 | void *datap, S32 size, |
3803 | S32 blocknum, S32 max_size) | 3790 | S32 blocknum, S32 max_size) |
3804 | { | 3791 | { |
3805 | getBinaryDataFast(gMessageStringTable.getString(blockname), | 3792 | getBinaryDataFast(LLMessageStringTable::getInstance()->getString(blockname), |
3806 | gMessageStringTable.getString(varname), | 3793 | LLMessageStringTable::getInstance()->getString(varname), |
3807 | datap, size, blocknum, max_size); | 3794 | datap, size, blocknum, max_size); |
3808 | } | 3795 | } |
3809 | 3796 | ||
@@ -3816,8 +3803,8 @@ void LLMessageSystem::getF32Fast(const char *block, const char *var, F32 &d, | |||
3816 | void LLMessageSystem::getF32(const char *block, const char *var, F32 &d, | 3803 | void LLMessageSystem::getF32(const char *block, const char *var, F32 &d, |
3817 | S32 blocknum) | 3804 | S32 blocknum) |
3818 | { | 3805 | { |
3819 | getF32Fast(gMessageStringTable.getString(block), | 3806 | getF32Fast(LLMessageStringTable::getInstance()->getString(block), |
3820 | gMessageStringTable.getString(var), d, blocknum); | 3807 | LLMessageStringTable::getInstance()->getString(var), d, blocknum); |
3821 | } | 3808 | } |
3822 | 3809 | ||
3823 | void LLMessageSystem::getF64Fast(const char *block, const char *var, F64 &d, | 3810 | void LLMessageSystem::getF64Fast(const char *block, const char *var, F64 &d, |
@@ -3829,8 +3816,8 @@ void LLMessageSystem::getF64Fast(const char *block, const char *var, F64 &d, | |||
3829 | void LLMessageSystem::getF64(const char *block, const char *var, F64 &d, | 3816 | void LLMessageSystem::getF64(const char *block, const char *var, F64 &d, |
3830 | S32 blocknum) | 3817 | S32 blocknum) |
3831 | { | 3818 | { |
3832 | getF64Fast(gMessageStringTable.getString(block), | 3819 | getF64Fast(LLMessageStringTable::getInstance()->getString(block), |
3833 | gMessageStringTable.getString(var), d, blocknum); | 3820 | LLMessageStringTable::getInstance()->getString(var), d, blocknum); |
3834 | } | 3821 | } |
3835 | 3822 | ||
3836 | 3823 | ||
@@ -3843,8 +3830,8 @@ void LLMessageSystem::getVector3Fast(const char *block, const char *var, | |||
3843 | void LLMessageSystem::getVector3(const char *block, const char *var, | 3830 | void LLMessageSystem::getVector3(const char *block, const char *var, |
3844 | LLVector3 &v, S32 blocknum ) | 3831 | LLVector3 &v, S32 blocknum ) |
3845 | { | 3832 | { |
3846 | getVector3Fast(gMessageStringTable.getString(block), | 3833 | getVector3Fast(LLMessageStringTable::getInstance()->getString(block), |
3847 | gMessageStringTable.getString(var), v, blocknum); | 3834 | LLMessageStringTable::getInstance()->getString(var), v, blocknum); |
3848 | } | 3835 | } |
3849 | 3836 | ||
3850 | void LLMessageSystem::getVector4Fast(const char *block, const char *var, | 3837 | void LLMessageSystem::getVector4Fast(const char *block, const char *var, |
@@ -3856,8 +3843,8 @@ void LLMessageSystem::getVector4Fast(const char *block, const char *var, | |||
3856 | void LLMessageSystem::getVector4(const char *block, const char *var, | 3843 | void LLMessageSystem::getVector4(const char *block, const char *var, |
3857 | LLVector4 &v, S32 blocknum ) | 3844 | LLVector4 &v, S32 blocknum ) |
3858 | { | 3845 | { |
3859 | getVector4Fast(gMessageStringTable.getString(block), | 3846 | getVector4Fast(LLMessageStringTable::getInstance()->getString(block), |
3860 | gMessageStringTable.getString(var), v, blocknum); | 3847 | LLMessageStringTable::getInstance()->getString(var), v, blocknum); |
3861 | } | 3848 | } |
3862 | 3849 | ||
3863 | void LLMessageSystem::getVector3dFast(const char *block, const char *var, | 3850 | void LLMessageSystem::getVector3dFast(const char *block, const char *var, |
@@ -3869,8 +3856,8 @@ void LLMessageSystem::getVector3dFast(const char *block, const char *var, | |||
3869 | void LLMessageSystem::getVector3d(const char *block, const char *var, | 3856 | void LLMessageSystem::getVector3d(const char *block, const char *var, |
3870 | LLVector3d &v, S32 blocknum ) | 3857 | LLVector3d &v, S32 blocknum ) |
3871 | { | 3858 | { |
3872 | getVector3dFast(gMessageStringTable.getString(block), | 3859 | getVector3dFast(LLMessageStringTable::getInstance()->getString(block), |
3873 | gMessageStringTable.getString(var), v, blocknum); | 3860 | LLMessageStringTable::getInstance()->getString(var), v, blocknum); |
3874 | } | 3861 | } |
3875 | 3862 | ||
3876 | void LLMessageSystem::getQuatFast(const char *block, const char *var, | 3863 | void LLMessageSystem::getQuatFast(const char *block, const char *var, |
@@ -3882,8 +3869,8 @@ void LLMessageSystem::getQuatFast(const char *block, const char *var, | |||
3882 | void LLMessageSystem::getQuat(const char *block, const char *var, | 3869 | void LLMessageSystem::getQuat(const char *block, const char *var, |
3883 | LLQuaternion &q, S32 blocknum) | 3870 | LLQuaternion &q, S32 blocknum) |
3884 | { | 3871 | { |
3885 | getQuatFast(gMessageStringTable.getString(block), | 3872 | getQuatFast(LLMessageStringTable::getInstance()->getString(block), |
3886 | gMessageStringTable.getString(var), q, blocknum); | 3873 | LLMessageStringTable::getInstance()->getString(var), q, blocknum); |
3887 | } | 3874 | } |
3888 | 3875 | ||
3889 | void LLMessageSystem::getUUIDFast(const char *block, const char *var, | 3876 | void LLMessageSystem::getUUIDFast(const char *block, const char *var, |
@@ -3895,8 +3882,8 @@ void LLMessageSystem::getUUIDFast(const char *block, const char *var, | |||
3895 | void LLMessageSystem::getUUID(const char *block, const char *var, LLUUID &u, | 3882 | void LLMessageSystem::getUUID(const char *block, const char *var, LLUUID &u, |
3896 | S32 blocknum ) | 3883 | S32 blocknum ) |
3897 | { | 3884 | { |
3898 | getUUIDFast(gMessageStringTable.getString(block), | 3885 | getUUIDFast(LLMessageStringTable::getInstance()->getString(block), |
3899 | gMessageStringTable.getString(var), u, blocknum); | 3886 | LLMessageStringTable::getInstance()->getString(var), u, blocknum); |
3900 | } | 3887 | } |
3901 | 3888 | ||
3902 | void LLMessageSystem::getIPAddrFast(const char *block, const char *var, | 3889 | void LLMessageSystem::getIPAddrFast(const char *block, const char *var, |
@@ -3908,8 +3895,8 @@ void LLMessageSystem::getIPAddrFast(const char *block, const char *var, | |||
3908 | void LLMessageSystem::getIPAddr(const char *block, const char *var, U32 &u, | 3895 | void LLMessageSystem::getIPAddr(const char *block, const char *var, U32 &u, |
3909 | S32 blocknum) | 3896 | S32 blocknum) |
3910 | { | 3897 | { |
3911 | getIPAddrFast(gMessageStringTable.getString(block), | 3898 | getIPAddrFast(LLMessageStringTable::getInstance()->getString(block), |
3912 | gMessageStringTable.getString(var), u, blocknum); | 3899 | LLMessageStringTable::getInstance()->getString(var), u, blocknum); |
3913 | } | 3900 | } |
3914 | 3901 | ||
3915 | void LLMessageSystem::getIPPortFast(const char *block, const char *var, | 3902 | void LLMessageSystem::getIPPortFast(const char *block, const char *var, |
@@ -3921,8 +3908,8 @@ void LLMessageSystem::getIPPortFast(const char *block, const char *var, | |||
3921 | void LLMessageSystem::getIPPort(const char *block, const char *var, U16 &u, | 3908 | void LLMessageSystem::getIPPort(const char *block, const char *var, U16 &u, |
3922 | S32 blocknum) | 3909 | S32 blocknum) |
3923 | { | 3910 | { |
3924 | getIPPortFast(gMessageStringTable.getString(block), | 3911 | getIPPortFast(LLMessageStringTable::getInstance()->getString(block), |
3925 | gMessageStringTable.getString(var), u, | 3912 | LLMessageStringTable::getInstance()->getString(var), u, |
3926 | blocknum); | 3913 | blocknum); |
3927 | } | 3914 | } |
3928 | 3915 | ||
@@ -3940,8 +3927,8 @@ void LLMessageSystem::getStringFast(const char *block, const char *var, | |||
3940 | void LLMessageSystem::getString(const char *block, const char *var, | 3927 | void LLMessageSystem::getString(const char *block, const char *var, |
3941 | S32 buffer_size, char *s, S32 blocknum ) | 3928 | S32 buffer_size, char *s, S32 blocknum ) |
3942 | { | 3929 | { |
3943 | getStringFast(gMessageStringTable.getString(block), | 3930 | getStringFast(LLMessageStringTable::getInstance()->getString(block), |
3944 | gMessageStringTable.getString(var), buffer_size, s, | 3931 | LLMessageStringTable::getInstance()->getString(var), buffer_size, s, |
3945 | blocknum); | 3932 | blocknum); |
3946 | } | 3933 | } |
3947 | 3934 | ||
@@ -3952,7 +3939,7 @@ S32 LLMessageSystem::getNumberOfBlocksFast(const char *blockname) | |||
3952 | 3939 | ||
3953 | S32 LLMessageSystem::getNumberOfBlocks(const char *blockname) | 3940 | S32 LLMessageSystem::getNumberOfBlocks(const char *blockname) |
3954 | { | 3941 | { |
3955 | return getNumberOfBlocksFast(gMessageStringTable.getString(blockname)); | 3942 | return getNumberOfBlocksFast(LLMessageStringTable::getInstance()->getString(blockname)); |
3956 | } | 3943 | } |
3957 | 3944 | ||
3958 | S32 LLMessageSystem::getSizeFast(const char *blockname, const char *varname) | 3945 | S32 LLMessageSystem::getSizeFast(const char *blockname, const char *varname) |
@@ -3962,8 +3949,8 @@ S32 LLMessageSystem::getSizeFast(const char *blockname, const char *varname) | |||
3962 | 3949 | ||
3963 | S32 LLMessageSystem::getSize(const char *blockname, const char *varname) | 3950 | S32 LLMessageSystem::getSize(const char *blockname, const char *varname) |
3964 | { | 3951 | { |
3965 | return getSizeFast(gMessageStringTable.getString(blockname), | 3952 | return getSizeFast(LLMessageStringTable::getInstance()->getString(blockname), |
3966 | gMessageStringTable.getString(varname)); | 3953 | LLMessageStringTable::getInstance()->getString(varname)); |
3967 | } | 3954 | } |
3968 | 3955 | ||
3969 | // size in bytes of variable length data | 3956 | // size in bytes of variable length data |
@@ -3976,8 +3963,8 @@ S32 LLMessageSystem::getSizeFast(const char *blockname, S32 blocknum, | |||
3976 | S32 LLMessageSystem::getSize(const char *blockname, S32 blocknum, | 3963 | S32 LLMessageSystem::getSize(const char *blockname, S32 blocknum, |
3977 | const char *varname) | 3964 | const char *varname) |
3978 | { | 3965 | { |
3979 | return getSizeFast(gMessageStringTable.getString(blockname), blocknum, | 3966 | return getSizeFast(LLMessageStringTable::getInstance()->getString(blockname), blocknum, |
3980 | gMessageStringTable.getString(varname)); | 3967 | LLMessageStringTable::getInstance()->getString(varname)); |
3981 | } | 3968 | } |
3982 | 3969 | ||
3983 | S32 LLMessageSystem::getReceiveSize() const | 3970 | S32 LLMessageSystem::getReceiveSize() const |