3 * =============================================================================
5 * Copyright (C) 2013 AlliedModders LLC. All rights reserved.
6 * =============================================================================
8 * This program is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3.0, as published by the
10 * Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU General Public License along with
18 * this program. If not, see <http://www.gnu.org/licenses/>.
20 * As a special exception, AlliedModders LLC gives you permission to link the
21 * code of this program (as well as its derivative works) to "Half-Life 2," the
22 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
23 * by the Valve Corporation. You must obey the GNU General Public License in
24 * all respects for all other code used. Additionally, AlliedModders LLC grants
25 * this exception to all derivative works. AlliedModders LLC defines further
26 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
27 * or <http://www.sourcemod.net/license.php>.
32 #include "logic_bridge.h"
33 #include "UserMessages.h"
34 #include "UserMessagePBHelpers.h"
35 #include "smn_usermsgs.h"
37 // Assumes pbuf message handle is param 1, gets message as msg
38 #define GET_MSG_FROM_HANDLE_OR_ERR() \
39 Handle_t hndl = static_cast<Handle_t>(params[1]); \
42 SMProtobufMessage *msg; \
45 sec.pIdentity = g_pCoreIdent; \
47 if ((herr=handlesys->ReadHandle(hndl, g_ProtobufType, &sec, (void **)&msg)) \
48 != HandleError_None) \
50 return pCtx->ThrowNativeError("Invalid protobuf message handle %x (error %d)", hndl, herr); \
53 // Assumes message field name is param 2, gets as strField
54 #define GET_FIELD_NAME_OR_ERR() \
57 if ((err=pCtx->LocalToString(params[2], &strField)) != SP_ERROR_NONE) \
59 pCtx->ThrowNativeErrorEx(err, NULL); \
63 static cell_t smn_PbReadInt(IPluginContext *pCtx, const cell_t *params)
65 GET_MSG_FROM_HANDLE_OR_ERR();
66 GET_FIELD_NAME_OR_ERR();
70 int index = params[0] >= 3 ? params[3] : -1;
73 if (!msg->GetInt32OrUnsignedOrEnum(strField, &ret))
75 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
80 if (!msg->GetRepeatedInt32OrUnsignedOrEnum(strField, index, &ret))
82 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
89 static cell_t smn_PbReadFloat(IPluginContext *pCtx, const cell_t *params)
91 GET_MSG_FROM_HANDLE_OR_ERR();
92 GET_FIELD_NAME_OR_ERR();
96 int index = params[0] >= 3 ? params[3] : -1;
99 if (!msg->GetFloatOrDouble(strField, &ret))
101 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
106 if (!msg->GetRepeatedFloatOrDouble(strField, index, &ret))
108 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
115 static cell_t smn_PbReadBool(IPluginContext *pCtx, const cell_t *params)
117 GET_MSG_FROM_HANDLE_OR_ERR();
118 GET_FIELD_NAME_OR_ERR();
122 int index = params[0] >= 3 ? params[3] : -1;
125 if (!msg->GetBool(strField, &ret))
127 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
132 if (!msg->GetRepeatedBool(strField, index, &ret))
134 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
141 static cell_t smn_PbReadString(IPluginContext *pCtx, const cell_t *params)
143 GET_MSG_FROM_HANDLE_OR_ERR();
144 GET_FIELD_NAME_OR_ERR();
147 pCtx->LocalToPhysAddr(params[3], (cell_t **)&buf);
149 int index = params[0] >= 5 ? params[5] : -1;
153 if (!msg->GetString(strField, buf, params[4]))
155 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
160 if (!msg->GetRepeatedString(strField, index, buf, params[4]))
162 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
169 static cell_t smn_PbReadColor(IPluginContext *pCtx, const cell_t *params)
171 GET_MSG_FROM_HANDLE_OR_ERR();
172 GET_FIELD_NAME_OR_ERR();
175 pCtx->LocalToPhysAddr(params[3], &out);
178 int index = params[0] >= 4 ? params[4] : -1;
181 if (!msg->GetColor(strField, &clr))
183 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
188 if (!msg->GetRepeatedColor(strField, index, &clr))
190 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
202 static cell_t smn_PbReadAngle(IPluginContext *pCtx, const cell_t *params)
204 GET_MSG_FROM_HANDLE_OR_ERR();
205 GET_FIELD_NAME_OR_ERR();
208 pCtx->LocalToPhysAddr(params[3], &out);
211 int index = params[0] >= 4 ? params[4] : -1;
214 if (!msg->GetQAngle(strField, &ang))
216 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
221 if (!msg->GetRepeatedQAngle(strField, index, &ang))
223 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
227 out[0] = sp_ftoc(ang.x);
228 out[1] = sp_ftoc(ang.y);
229 out[2] = sp_ftoc(ang.z);
234 static cell_t smn_PbReadVector(IPluginContext *pCtx, const cell_t *params)
236 GET_MSG_FROM_HANDLE_OR_ERR();
237 GET_FIELD_NAME_OR_ERR();
240 pCtx->LocalToPhysAddr(params[3], &out);
243 int index = params[0] >= 4 ? params[4] : -1;
246 if (!msg->GetVector(strField, &vec))
248 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
253 if (!msg->GetRepeatedVector(strField, index, &vec))
255 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
259 out[0] = sp_ftoc(vec.x);
260 out[1] = sp_ftoc(vec.y);
261 out[2] = sp_ftoc(vec.z);
266 static cell_t smn_PbReadVector2D(IPluginContext *pCtx, const cell_t *params)
268 GET_MSG_FROM_HANDLE_OR_ERR();
269 GET_FIELD_NAME_OR_ERR();
272 pCtx->LocalToPhysAddr(params[3], &out);
275 int index = params[0] >= 4 ? params[4] : -1;
278 if (!msg->GetVector2D(strField, &vec))
280 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
285 if (!msg->GetRepeatedVector2D(strField, index, &vec))
287 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
291 out[0] = sp_ftoc(vec.x);
292 out[1] = sp_ftoc(vec.y);
297 static cell_t smn_PbGetRepeatedFieldCount(IPluginContext *pCtx, const cell_t *params)
299 GET_MSG_FROM_HANDLE_OR_ERR();
300 GET_FIELD_NAME_OR_ERR();
302 int cnt = msg->GetRepeatedFieldCount(strField);
305 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
311 static cell_t smn_PbSetInt(IPluginContext *pCtx, const cell_t *params)
313 GET_MSG_FROM_HANDLE_OR_ERR();
314 GET_FIELD_NAME_OR_ERR();
316 int index = params[0] >= 4 ? params[4] : -1;
319 if (!msg->SetInt32OrUnsignedOrEnum(strField, params[3]))
321 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
326 if (!msg->SetRepeatedInt32OrUnsignedOrEnum(strField, index, params[3]))
328 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
335 static cell_t smn_PbSetFloat(IPluginContext *pCtx, const cell_t *params)
337 GET_MSG_FROM_HANDLE_OR_ERR();
338 GET_FIELD_NAME_OR_ERR();
340 int index = params[0] >= 4 ? params[4] : -1;
343 if (!msg->SetFloatOrDouble(strField, sp_ctof(params[3])))
345 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
350 if (!msg->SetRepeatedFloatOrDouble(strField, index, sp_ctof(params[3])))
352 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
359 static cell_t smn_PbSetBool(IPluginContext *pCtx, const cell_t *params)
361 GET_MSG_FROM_HANDLE_OR_ERR();
362 GET_FIELD_NAME_OR_ERR();
364 bool value = (params[3] == 0 ? false : true);
365 int index = params[0] >= 4 ? params[4] : -1;
368 if (!msg->SetBool(strField, value))
370 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
375 if (!msg->SetRepeatedBool(strField, index, value))
377 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
384 static cell_t smn_PbSetString(IPluginContext *pCtx, const cell_t *params)
386 GET_MSG_FROM_HANDLE_OR_ERR();
387 GET_FIELD_NAME_OR_ERR();
390 if ((err=pCtx->LocalToString(params[3], &strValue)) != SP_ERROR_NONE)
392 pCtx->ThrowNativeErrorEx(err, NULL);
396 int index = params[0] >= 4 ? params[4] : -1;
399 if (!msg->SetString(strField, strValue))
401 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
406 if (!msg->SetRepeatedString(strField, index, strValue))
408 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
415 static cell_t smn_PbSetColor(IPluginContext *pCtx, const cell_t *params)
417 GET_MSG_FROM_HANDLE_OR_ERR();
418 GET_FIELD_NAME_OR_ERR();
421 if ((err=pCtx->LocalToPhysAddr(params[3], &clrParams)) != SP_ERROR_NONE)
423 pCtx->ThrowNativeErrorEx(err, NULL);
433 int index = params[0] >= 4 ? params[4] : -1;
436 if (!msg->SetColor(strField, clr))
438 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
443 if (!msg->SetRepeatedColor(strField, index, clr))
445 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
452 static cell_t smn_PbSetAngle(IPluginContext *pCtx, const cell_t *params)
454 GET_MSG_FROM_HANDLE_OR_ERR();
455 GET_FIELD_NAME_OR_ERR();
458 if ((err=pCtx->LocalToPhysAddr(params[3], &angParams)) != SP_ERROR_NONE)
460 pCtx->ThrowNativeErrorEx(err, NULL);
465 sp_ctof(angParams[0]),
466 sp_ctof(angParams[1]),
467 sp_ctof(angParams[2]));
469 int index = params[0] >= 4 ? params[4] : -1;
472 if (!msg->SetQAngle(strField, ang))
474 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
479 if (!msg->SetRepeatedQAngle(strField, index, ang))
481 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
488 static cell_t smn_PbSetVector(IPluginContext *pCtx, const cell_t *params)
490 GET_MSG_FROM_HANDLE_OR_ERR();
491 GET_FIELD_NAME_OR_ERR();
494 if ((err=pCtx->LocalToPhysAddr(params[3], &vecParams)) != SP_ERROR_NONE)
496 pCtx->ThrowNativeErrorEx(err, NULL);
501 sp_ctof(vecParams[0]),
502 sp_ctof(vecParams[1]),
503 sp_ctof(vecParams[2]));
505 int index = params[0] >= 4 ? params[4] : -1;
508 if (!msg->SetVector(strField, vec))
510 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
515 if (!msg->SetRepeatedVector(strField, index, vec))
517 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
524 static cell_t smn_PbSetVector2D(IPluginContext *pCtx, const cell_t *params)
526 GET_MSG_FROM_HANDLE_OR_ERR();
527 GET_FIELD_NAME_OR_ERR();
530 if ((err=pCtx->LocalToPhysAddr(params[3], &vecParams)) != SP_ERROR_NONE)
532 pCtx->ThrowNativeErrorEx(err, NULL);
537 sp_ctof(vecParams[0]),
538 sp_ctof(vecParams[1]));
540 int index = params[0] >= 4 ? params[4] : -1;
543 if (!msg->SetVector2D(strField, vec))
545 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
550 if (!msg->SetRepeatedVector2D(strField, index, vec))
552 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, index, msg->GetProtobufMessage()->GetTypeName().c_str());
559 static cell_t smn_PbAddInt(IPluginContext *pCtx, const cell_t *params)
561 GET_MSG_FROM_HANDLE_OR_ERR();
562 GET_FIELD_NAME_OR_ERR();
564 if (!msg->AddInt32OrUnsignedOrEnum(strField, params[3]))
566 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
572 static cell_t smn_PbAddFloat(IPluginContext *pCtx, const cell_t *params)
574 GET_MSG_FROM_HANDLE_OR_ERR();
575 GET_FIELD_NAME_OR_ERR();
577 if (!msg->AddFloatOrDouble(strField, sp_ctof(params[3])))
579 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
585 static cell_t smn_PbAddBool(IPluginContext *pCtx, const cell_t *params)
587 GET_MSG_FROM_HANDLE_OR_ERR();
588 GET_FIELD_NAME_OR_ERR();
590 bool value = (params[3] == 0 ? false : true);
591 if (!msg->AddBool(strField, value))
593 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
599 static cell_t smn_PbAddString(IPluginContext *pCtx, const cell_t *params)
601 GET_MSG_FROM_HANDLE_OR_ERR();
602 GET_FIELD_NAME_OR_ERR();
605 if ((err=pCtx->LocalToString(params[3], &strValue)) != SP_ERROR_NONE)
607 pCtx->ThrowNativeErrorEx(err, NULL);
611 if (!msg->AddString(strField, strValue))
613 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
619 static cell_t smn_PbAddColor(IPluginContext *pCtx, const cell_t *params)
621 GET_MSG_FROM_HANDLE_OR_ERR();
622 GET_FIELD_NAME_OR_ERR();
625 if ((err=pCtx->LocalToPhysAddr(params[3], &clrParams)) != SP_ERROR_NONE)
627 pCtx->ThrowNativeErrorEx(err, NULL);
637 if (!msg->AddColor(strField, clr))
639 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
645 static cell_t smn_PbAddAngle(IPluginContext *pCtx, const cell_t *params)
647 GET_MSG_FROM_HANDLE_OR_ERR();
648 GET_FIELD_NAME_OR_ERR();
651 if ((err=pCtx->LocalToPhysAddr(params[3], &angParams)) != SP_ERROR_NONE)
653 pCtx->ThrowNativeErrorEx(err, NULL);
658 sp_ctof(angParams[0]),
659 sp_ctof(angParams[1]),
660 sp_ctof(angParams[2]));
662 if (!msg->AddQAngle(strField, ang))
664 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
670 static cell_t smn_PbAddVector(IPluginContext *pCtx, const cell_t *params)
672 GET_MSG_FROM_HANDLE_OR_ERR();
673 GET_FIELD_NAME_OR_ERR();
676 if ((err=pCtx->LocalToPhysAddr(params[3], &vecParams)) != SP_ERROR_NONE)
678 pCtx->ThrowNativeErrorEx(err, NULL);
683 sp_ctof(vecParams[0]),
684 sp_ctof(vecParams[1]),
685 sp_ctof(vecParams[2]));
687 if (!msg->AddVector(strField, vec))
689 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
695 static cell_t smn_PbAddVector2D(IPluginContext *pCtx, const cell_t *params)
697 GET_MSG_FROM_HANDLE_OR_ERR();
698 GET_FIELD_NAME_OR_ERR();
701 if ((err=pCtx->LocalToPhysAddr(params[3], &vecParams)) != SP_ERROR_NONE)
703 pCtx->ThrowNativeErrorEx(err, NULL);
708 sp_ctof(vecParams[0]),
709 sp_ctof(vecParams[1]));
711 if (!msg->AddVector2D(strField, vec))
713 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
719 static cell_t smn_PbReadMessage(IPluginContext *pCtx, const cell_t *params)
721 GET_MSG_FROM_HANDLE_OR_ERR();
722 GET_FIELD_NAME_OR_ERR();
724 protobuf::Message *innerMsg;
725 if (!msg->GetMessage(strField, &innerMsg))
727 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
730 Handle_t outHndl = handlesys->CreateHandle(g_ProtobufType, new SMProtobufMessage(innerMsg), NULL, g_pCoreIdent, NULL);
731 msg->AddChildHandle(outHndl);
736 static cell_t smn_PbReadRepeatedMessage(IPluginContext *pCtx, const cell_t *params)
738 GET_MSG_FROM_HANDLE_OR_ERR();
739 GET_FIELD_NAME_OR_ERR();
741 const protobuf::Message *innerMsg;
742 if (!msg->GetRepeatedMessage(strField, params[3], &innerMsg))
744 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, params[3], msg->GetProtobufMessage()->GetTypeName().c_str());
747 Handle_t outHndl = handlesys->CreateHandle(g_ProtobufType, new SMProtobufMessage(const_cast<protobuf::Message *>(innerMsg)), NULL, g_pCoreIdent, NULL);
748 msg->AddChildHandle(outHndl);
753 static cell_t smn_PbAddMessage(IPluginContext *pCtx, const cell_t *params)
755 GET_MSG_FROM_HANDLE_OR_ERR();
756 GET_FIELD_NAME_OR_ERR();
758 protobuf::Message *innerMsg;
759 if (!msg->AddMessage(strField, &innerMsg))
761 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
764 Handle_t outHndl = handlesys->CreateHandle(g_ProtobufType, new SMProtobufMessage(innerMsg), NULL, g_pCoreIdent, NULL);
765 msg->AddChildHandle(outHndl);
770 REGISTER_NATIVES(protobufnatives)
772 {"PbReadInt", smn_PbReadInt},
773 {"PbReadFloat", smn_PbReadFloat},
774 {"PbReadBool", smn_PbReadBool},
775 {"PbReadString", smn_PbReadString},
776 {"PbReadColor", smn_PbReadColor},
777 {"PbReadAngle", smn_PbReadAngle},
778 {"PbReadVector", smn_PbReadVector},
779 {"PbReadVector2D", smn_PbReadVector2D},
780 {"PbGetRepeatedFieldCount", smn_PbGetRepeatedFieldCount},
781 {"PbSetInt", smn_PbSetInt},
782 {"PbSetFloat", smn_PbSetFloat},
783 {"PbSetBool", smn_PbSetBool},
784 {"PbSetString", smn_PbSetString},
785 {"PbSetColor", smn_PbSetColor},
786 {"PbSetAngle", smn_PbSetAngle},
787 {"PbSetVector", smn_PbSetVector},
788 {"PbSetVector2D", smn_PbSetVector2D},
789 {"PbAddInt", smn_PbAddInt},
790 {"PbAddFloat", smn_PbAddFloat},
791 {"PbAddBool", smn_PbAddBool},
792 {"PbAddString", smn_PbAddString},
793 {"PbAddColor", smn_PbAddColor},
794 {"PbAddAngle", smn_PbAddAngle},
795 {"PbAddVector", smn_PbAddVector},
796 {"PbAddVector2D", smn_PbAddVector2D},
797 {"PbReadMessage", smn_PbReadMessage},
798 {"PbReadRepeatedMessage", smn_PbReadRepeatedMessage},
799 {"PbAddMessage", smn_PbAddMessage},
806 @@@@@@@@@@@@@@@@@@@@@
807 @@@@@@@@@@@@@@@@@@@@@@@@
808 @@@@@@@@ @@@@@@@@@@@@@
809 @@@@@@@@ @@@@@@@@@@@@@
810 @@@@@@ @@@@@@@@@@@@@@@
811 0000 @@@@@@@@@@@@@@@@@@@@@
812 000000000 @@@@@@@@@@@@@@@@@@@
813 0000000000000000000 @@@@@@@@@@@@@@@
814 00000000000000000000 @@@@@@@@@@@@@@@
815 000000000 @@@@@@@@@@@@@@@
819 @@@@@@@@@@@@@@@@@@ @@@@
820 @@@@@@@@@@@@@@@@@@@ @@@@@@@
821 @@@ @@@@ @@@ @@@@@@@@@@
822 @@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@
823 @@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ @@@@@@@@ @@ @@@@@@@@@@@@@@@
824 @@@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@@@@@@@@
825 @@@@@@@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@@@@@@@@@@@@
826 @@@@@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@ @@@@@@@@@@@@
827 @@@@@@@@@@@@@@@@@@@@ @@@@@@ @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@@@
828 @@@@@@@@@@@@@@@@@ @@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@ @@@@@@
829 @@@@@@@@@ @@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@ @@ @@@@@ @@@@@@@@
830 @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @@@@@@ @@@@ @@@@@@
831 @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @@@@@@ @@@@@@ @@@@@@
832 @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @@@@@@@@ @@@@
833 @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @ @@@@@
834 @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@ @@@@@ @@@@ ////
835 //////////// @@@@@@@@@@@ @@@@@@ @@@@@@@@@@@@@@@@@@@@ @@ @@@@@@@@@ @@@@ //// ////////////
836 ///////////////// /// @@@@@ @@@@ @@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@ ///// /////// /////////
837 ///////////////////// ///// @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@@@ @ @@@@ ////// /////// ///////////////
838 ///////////////////////// /////// @@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@ @@@@ ////// //////// ////////////////////
839 //////////////////////////// ////////// @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@ @@@@@@@@@ @@@ ////// ////////// ////////////////////////
840 //////////////////// ////////// /////////// @@@@@@@@@@@@@@@@@ @@@@@@@@ @@@ @@@@@@ ////// //////////// //////////////////////////
841 //////////////////// //////////// /////////// @@@@@@@@@@@@@@@@ @@@@ ///////////////////// /////////////////////////////
842 ///////////////////// ////////////// ////// @@@@@@@@@ ///////////////////////////////////////////////////////////
843 //////////////////// ///////////////////////////////////// ///////////////////////////////////////////////////////////////////////
844 ///////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////
845 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
846 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
847 /////////////////////////////////////////////////////////////////////////////////////////
848 //////////////////////////////////////////////////////////