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 "UserMessages.h"
34 #ifdef USE_PROTOBUF_USERMESSAGES
36 #include "HandleSys.h"
37 #include "UserMessagePBHelpers.h"
38 #include "smn_usermsgs.h"
40 // Assumes pbuf message handle is param 1, gets message as msg
41 #define GET_MSG_FROM_HANDLE_OR_ERR() \
42 Handle_t hndl = static_cast<Handle_t>(params[1]); \
45 SMProtobufMessage *msg; \
48 sec.pIdentity = g_pCoreIdent; \
50 if ((herr=g_HandleSys.ReadHandle(hndl, g_ProtobufType, &sec, (void **)&msg)) \
51 != HandleError_None) \
53 return pCtx->ThrowNativeError("Invalid protobuf message handle %x (error %d)", hndl, herr); \
56 // Assumes message field name is param 2, gets as strField
57 #define GET_FIELD_NAME_OR_ERR() \
60 if ((err=pCtx->LocalToString(params[2], &strField)) != SP_ERROR_NONE) \
62 pCtx->ThrowNativeErrorEx(err, NULL); \
66 static cell_t smn_PbReadInt(IPluginContext *pCtx, const cell_t *params)
68 GET_MSG_FROM_HANDLE_OR_ERR();
69 GET_FIELD_NAME_OR_ERR();
72 if (!msg->GetInt32OrUnsigned(strField, &ret))
74 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
80 static cell_t smn_PbReadFloat(IPluginContext *pCtx, const cell_t *params)
82 GET_MSG_FROM_HANDLE_OR_ERR();
83 GET_FIELD_NAME_OR_ERR();
86 if (!msg->GetFloatOrDouble(strField, &ret))
88 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
94 static cell_t smn_PbReadBool(IPluginContext *pCtx, const cell_t *params)
96 GET_MSG_FROM_HANDLE_OR_ERR();
97 GET_FIELD_NAME_OR_ERR();
100 if (!msg->GetBool(strField, &ret))
102 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
108 static cell_t smn_PbReadString(IPluginContext *pCtx, const cell_t *params)
110 GET_MSG_FROM_HANDLE_OR_ERR();
111 GET_FIELD_NAME_OR_ERR();
114 pCtx->LocalToPhysAddr(params[3], (cell_t **)&buf);
116 if (!msg->GetString(strField, buf, params[4]))
118 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
124 static cell_t smn_PbReadColor(IPluginContext *pCtx, const cell_t *params)
126 GET_MSG_FROM_HANDLE_OR_ERR();
127 GET_FIELD_NAME_OR_ERR();
130 pCtx->LocalToPhysAddr(params[3], &out);
133 if (!msg->GetColor(strField, &clr))
135 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
146 static cell_t smn_PbReadAngle(IPluginContext *pCtx, const cell_t *params)
148 GET_MSG_FROM_HANDLE_OR_ERR();
149 GET_FIELD_NAME_OR_ERR();
152 pCtx->LocalToPhysAddr(params[3], &out);
155 if (!msg->GetQAngle(strField, &ang))
157 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
160 out[0] = sp_ftoc(ang.x);
161 out[1] = sp_ftoc(ang.y);
162 out[2] = sp_ftoc(ang.z);
167 static cell_t smn_PbReadVector(IPluginContext *pCtx, const cell_t *params)
169 GET_MSG_FROM_HANDLE_OR_ERR();
170 GET_FIELD_NAME_OR_ERR();
173 pCtx->LocalToPhysAddr(params[3], &out);
176 if (!msg->GetVector(strField, &vec))
178 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
181 out[0] = sp_ftoc(vec.x);
182 out[1] = sp_ftoc(vec.y);
183 out[2] = sp_ftoc(vec.z);
188 static cell_t smn_PbReadVector2D(IPluginContext *pCtx, const cell_t *params)
190 GET_MSG_FROM_HANDLE_OR_ERR();
191 GET_FIELD_NAME_OR_ERR();
194 pCtx->LocalToPhysAddr(params[3], &out);
197 if (!msg->GetVector2D(strField, &vec))
199 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
202 out[0] = sp_ftoc(vec.x);
203 out[1] = sp_ftoc(vec.y);
208 static cell_t smn_PbGetRepeatedFieldCount(IPluginContext *pCtx, const cell_t *params)
210 GET_MSG_FROM_HANDLE_OR_ERR();
211 GET_FIELD_NAME_OR_ERR();
213 int cnt = msg->GetRepeatedFieldCount(strField);
216 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
222 static cell_t smn_PbReadRepeatedInt(IPluginContext *pCtx, const cell_t *params)
224 GET_MSG_FROM_HANDLE_OR_ERR();
225 GET_FIELD_NAME_OR_ERR();
228 if (!msg->GetRepeatedInt32OrUnsigned(strField, params[3], &ret))
230 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, params[3], msg->GetProtobufMessage()->GetTypeName());
236 static cell_t smn_PbReadRepeatedFloat(IPluginContext *pCtx, const cell_t *params)
238 GET_MSG_FROM_HANDLE_OR_ERR();
239 GET_FIELD_NAME_OR_ERR();
242 if (!msg->GetRepeatedFloatOrDouble(strField, params[3], &ret))
244 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, params[3], msg->GetProtobufMessage()->GetTypeName());
250 static cell_t smn_PbReadRepeatedBool(IPluginContext *pCtx, const cell_t *params)
252 GET_MSG_FROM_HANDLE_OR_ERR();
253 GET_FIELD_NAME_OR_ERR();
256 if (!msg->GetRepeatedBool(strField, params[3], &ret))
258 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, params[3], msg->GetProtobufMessage()->GetTypeName());
264 static cell_t smn_PbReadRepeatedString(IPluginContext *pCtx, const cell_t *params)
266 GET_MSG_FROM_HANDLE_OR_ERR();
267 GET_FIELD_NAME_OR_ERR();
270 pCtx->LocalToPhysAddr(params[4], (cell_t **)&buf);
272 if (!msg->GetRepeatedString(strField, params[3], buf, params[5]))
274 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, params[3], msg->GetProtobufMessage()->GetTypeName());
280 static cell_t smn_PbReadRepeatedColor(IPluginContext *pCtx, const cell_t *params)
282 GET_MSG_FROM_HANDLE_OR_ERR();
283 GET_FIELD_NAME_OR_ERR();
286 pCtx->LocalToPhysAddr(params[4], &out);
289 if (!msg->GetRepeatedColor(strField, params[3], &clr))
291 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, params[3], msg->GetProtobufMessage()->GetTypeName());
302 static cell_t smn_PbReadRepeatedAngle(IPluginContext *pCtx, const cell_t *params)
304 GET_MSG_FROM_HANDLE_OR_ERR();
305 GET_FIELD_NAME_OR_ERR();
308 pCtx->LocalToPhysAddr(params[4], &out);
311 if (!msg->GetRepeatedQAngle(strField, params[3], &ang))
313 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, params[3], msg->GetProtobufMessage()->GetTypeName());
316 out[0] = sp_ftoc(ang.x);
317 out[1] = sp_ftoc(ang.y);
318 out[2] = sp_ftoc(ang.z);
323 static cell_t smn_PbReadRepeatedVector(IPluginContext *pCtx, const cell_t *params)
325 GET_MSG_FROM_HANDLE_OR_ERR();
326 GET_FIELD_NAME_OR_ERR();
329 pCtx->LocalToPhysAddr(params[4], &out);
332 if (!msg->GetRepeatedVector(strField, params[3], &vec))
334 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, params[3], msg->GetProtobufMessage()->GetTypeName());
337 out[0] = sp_ftoc(vec.x);
338 out[1] = sp_ftoc(vec.y);
339 out[2] = sp_ftoc(vec.z);
344 static cell_t smn_PbReadRepeatedVector2D(IPluginContext *pCtx, const cell_t *params)
346 GET_MSG_FROM_HANDLE_OR_ERR();
347 GET_FIELD_NAME_OR_ERR();
350 pCtx->LocalToPhysAddr(params[4], &out);
353 if (!msg->GetRepeatedVector2D(strField, params[3], &vec))
355 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, params[3], msg->GetProtobufMessage()->GetTypeName());
358 out[0] = sp_ftoc(vec.x);
359 out[1] = sp_ftoc(vec.y);
364 static cell_t smn_PbSetInt(IPluginContext *pCtx, const cell_t *params)
366 GET_MSG_FROM_HANDLE_OR_ERR();
367 GET_FIELD_NAME_OR_ERR();
369 if (!msg->SetInt32OrUnsigned(strField, params[3]))
371 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
377 static cell_t smn_PbSetFloat(IPluginContext *pCtx, const cell_t *params)
379 GET_MSG_FROM_HANDLE_OR_ERR();
380 GET_FIELD_NAME_OR_ERR();
382 if (!msg->SetFloatOrDouble(strField, sp_ctof(params[3])))
384 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
390 static cell_t smn_PbSetBool(IPluginContext *pCtx, const cell_t *params)
392 GET_MSG_FROM_HANDLE_OR_ERR();
393 GET_FIELD_NAME_OR_ERR();
395 bool value = (params[3] == 0 ? false : true);
396 if (!msg->SetBool(strField, value))
398 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
404 static cell_t smn_PbSetString(IPluginContext *pCtx, const cell_t *params)
406 GET_MSG_FROM_HANDLE_OR_ERR();
407 GET_FIELD_NAME_OR_ERR();
410 if ((err=pCtx->LocalToString(params[3], &strValue)) != SP_ERROR_NONE)
412 pCtx->ThrowNativeErrorEx(err, NULL);
416 if (!msg->SetString(strField, strValue))
418 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
424 static cell_t smn_PbSetColor(IPluginContext *pCtx, const cell_t *params)
426 GET_MSG_FROM_HANDLE_OR_ERR();
427 GET_FIELD_NAME_OR_ERR();
430 if ((err=pCtx->LocalToPhysAddr(params[3], &clrParams)) != SP_ERROR_NONE)
432 pCtx->ThrowNativeErrorEx(err, NULL);
442 if (!msg->SetColor(strField, clr))
444 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
450 static cell_t smn_PbSetAngle(IPluginContext *pCtx, const cell_t *params)
452 GET_MSG_FROM_HANDLE_OR_ERR();
453 GET_FIELD_NAME_OR_ERR();
456 if ((err=pCtx->LocalToPhysAddr(params[3], &angParams)) != SP_ERROR_NONE)
458 pCtx->ThrowNativeErrorEx(err, NULL);
463 sp_ctof(angParams[0]),
464 sp_ctof(angParams[1]),
465 sp_ctof(angParams[2]));
467 if (!msg->SetQAngle(strField, ang))
469 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
475 static cell_t smn_PbSetVector(IPluginContext *pCtx, const cell_t *params)
477 GET_MSG_FROM_HANDLE_OR_ERR();
478 GET_FIELD_NAME_OR_ERR();
481 if ((err=pCtx->LocalToPhysAddr(params[3], &vecParams)) != SP_ERROR_NONE)
483 pCtx->ThrowNativeErrorEx(err, NULL);
488 sp_ctof(vecParams[0]),
489 sp_ctof(vecParams[1]),
490 sp_ctof(vecParams[2]));
492 if (!msg->SetVector(strField, vec))
494 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
500 static cell_t smn_PbSetVector2D(IPluginContext *pCtx, const cell_t *params)
502 GET_MSG_FROM_HANDLE_OR_ERR();
503 GET_FIELD_NAME_OR_ERR();
506 if ((err=pCtx->LocalToPhysAddr(params[3], &vecParams)) != SP_ERROR_NONE)
508 pCtx->ThrowNativeErrorEx(err, NULL);
513 sp_ctof(vecParams[0]),
514 sp_ctof(vecParams[1]));
516 if (!msg->SetVector2D(strField, vec))
518 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
524 static cell_t smn_PbAddInt(IPluginContext *pCtx, const cell_t *params)
526 GET_MSG_FROM_HANDLE_OR_ERR();
527 GET_FIELD_NAME_OR_ERR();
529 if (!msg->AddInt32OrUnsigned(strField, params[3]))
531 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
537 static cell_t smn_PbAddFloat(IPluginContext *pCtx, const cell_t *params)
539 GET_MSG_FROM_HANDLE_OR_ERR();
540 GET_FIELD_NAME_OR_ERR();
542 if (!msg->AddFloatOrDouble(strField, sp_ctof(params[3])))
544 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
550 static cell_t smn_PbAddBool(IPluginContext *pCtx, const cell_t *params)
552 GET_MSG_FROM_HANDLE_OR_ERR();
553 GET_FIELD_NAME_OR_ERR();
555 bool value = (params[3] == 0 ? false : true);
556 if (!msg->AddBool(strField, value))
558 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
564 static cell_t smn_PbAddString(IPluginContext *pCtx, const cell_t *params)
566 GET_MSG_FROM_HANDLE_OR_ERR();
567 GET_FIELD_NAME_OR_ERR();
570 if ((err=pCtx->LocalToString(params[3], &strValue)) != SP_ERROR_NONE)
572 pCtx->ThrowNativeErrorEx(err, NULL);
576 if (!msg->AddString(strField, strValue))
578 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
584 static cell_t smn_PbAddColor(IPluginContext *pCtx, const cell_t *params)
586 GET_MSG_FROM_HANDLE_OR_ERR();
587 GET_FIELD_NAME_OR_ERR();
590 if ((err=pCtx->LocalToPhysAddr(params[3], &clrParams)) != SP_ERROR_NONE)
592 pCtx->ThrowNativeErrorEx(err, NULL);
602 if (!msg->AddColor(strField, clr))
604 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
610 static cell_t smn_PbAddAngle(IPluginContext *pCtx, const cell_t *params)
612 GET_MSG_FROM_HANDLE_OR_ERR();
613 GET_FIELD_NAME_OR_ERR();
616 if ((err=pCtx->LocalToPhysAddr(params[3], &angParams)) != SP_ERROR_NONE)
618 pCtx->ThrowNativeErrorEx(err, NULL);
623 sp_ctof(angParams[0]),
624 sp_ctof(angParams[1]),
625 sp_ctof(angParams[2]));
627 if (!msg->AddQAngle(strField, ang))
629 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
635 static cell_t smn_PbAddVector(IPluginContext *pCtx, const cell_t *params)
637 GET_MSG_FROM_HANDLE_OR_ERR();
638 GET_FIELD_NAME_OR_ERR();
641 if ((err=pCtx->LocalToPhysAddr(params[3], &vecParams)) != SP_ERROR_NONE)
643 pCtx->ThrowNativeErrorEx(err, NULL);
648 sp_ctof(vecParams[0]),
649 sp_ctof(vecParams[1]),
650 sp_ctof(vecParams[2]));
652 if (!msg->AddVector(strField, vec))
654 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
660 static cell_t smn_PbAddVector2D(IPluginContext *pCtx, const cell_t *params)
662 GET_MSG_FROM_HANDLE_OR_ERR();
663 GET_FIELD_NAME_OR_ERR();
666 if ((err=pCtx->LocalToPhysAddr(params[3], &vecParams)) != SP_ERROR_NONE)
668 pCtx->ThrowNativeErrorEx(err, NULL);
673 sp_ctof(vecParams[0]),
674 sp_ctof(vecParams[1]));
676 if (!msg->AddVector2D(strField, vec))
678 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
684 static cell_t smn_PbReadMessage(IPluginContext *pCtx, const cell_t *params)
686 GET_MSG_FROM_HANDLE_OR_ERR();
687 GET_FIELD_NAME_OR_ERR();
689 protobuf::Message *innerMsg;
690 if (!msg->GetMessage(strField, &innerMsg))
692 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
695 Handle_t outHndl = g_HandleSys.CreateHandle(g_ProtobufType, new SMProtobufMessage(innerMsg), NULL, g_pCoreIdent, NULL);
696 msg->AddChildHandle(outHndl);
701 static cell_t smn_PbReadRepeatedMessage(IPluginContext *pCtx, const cell_t *params)
703 GET_MSG_FROM_HANDLE_OR_ERR();
704 GET_FIELD_NAME_OR_ERR();
706 const protobuf::Message *innerMsg;
707 if (!msg->GetRepeatedMessage(strField, params[3], &innerMsg))
709 return pCtx->ThrowNativeError("Invalid field \"%s\"[%d] for message \"%s\"", strField, params[3], msg->GetProtobufMessage()->GetTypeName());
712 Handle_t outHndl = g_HandleSys.CreateHandle(g_ProtobufType, new SMProtobufMessage(const_cast<protobuf::Message *>(innerMsg)), NULL, g_pCoreIdent, NULL);
713 msg->AddChildHandle(outHndl);
718 static cell_t smn_PbAddMessage(IPluginContext *pCtx, const cell_t *params)
720 GET_MSG_FROM_HANDLE_OR_ERR();
721 GET_FIELD_NAME_OR_ERR();
723 protobuf::Message *innerMsg;
724 if (!msg->AddMessage(strField, &innerMsg))
726 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName());
729 Handle_t outHndl = g_HandleSys.CreateHandle(g_ProtobufType, new SMProtobufMessage(innerMsg), NULL, g_pCoreIdent, NULL);
730 msg->AddChildHandle(outHndl);
735 REGISTER_NATIVES(protobufnatives)
737 {"PbReadInt", smn_PbReadInt},
738 {"PbReadFloat", smn_PbReadFloat},
739 {"PbReadBool", smn_PbReadBool},
740 {"PbReadString", smn_PbReadString},
741 {"PbReadColor", smn_PbReadColor},
742 {"PbReadAngle", smn_PbReadAngle},
743 {"PbReadVector", smn_PbReadVector},
744 {"PbReadVector2D", smn_PbReadVector2D},
745 {"PbGetRepeatedFieldCount", smn_PbGetRepeatedFieldCount},
746 {"PbReadRepeatedInt", smn_PbReadRepeatedInt},
747 {"PbReadRepeatedFloat", smn_PbReadRepeatedFloat},
748 {"PbReadRepeatedBool", smn_PbReadRepeatedBool},
749 {"PbReadRepeatedString", smn_PbReadRepeatedString},
750 {"PbReadRepeatedColor", smn_PbReadRepeatedColor},
751 {"PbReadRepeatedAngle", smn_PbReadRepeatedAngle},
752 {"PbReadRepeatedVector", smn_PbReadRepeatedVector},
753 {"PbReadRepeatedVector2D", smn_PbReadRepeatedVector2D},
754 {"PbSetInt", smn_PbSetInt},
755 {"PbSetFloat", smn_PbSetFloat},
756 {"PbSetBool", smn_PbSetBool},
757 {"PbSetString", smn_PbSetString},
758 {"PbSetColor", smn_PbSetColor},
759 {"PbSetAngle", smn_PbSetAngle},
760 {"PbSetVector", smn_PbSetVector},
761 {"PbSetVector2D", smn_PbSetVector2D},
762 {"PbAddInt", smn_PbAddInt},
763 {"PbAddFloat", smn_PbAddFloat},
764 {"PbAddBool", smn_PbAddBool},
765 {"PbAddString", smn_PbAddString},
766 {"PbAddColor", smn_PbAddColor},
767 {"PbAddAngle", smn_PbAddAngle},
768 {"PbAddVector", smn_PbAddVector},
769 {"PbAddVector2D", smn_PbAddVector2D},
770 {"PbReadMessage", smn_PbReadMessage},
771 {"PbReadRepeatedMessage", smn_PbReadRepeatedMessage},
772 {"PbAddMessage", smn_PbAddMessage},
779 @@@@@@@@@@@@@@@@@@@@@
780 @@@@@@@@@@@@@@@@@@@@@@@@
781 @@@@@@@@ @@@@@@@@@@@@@
782 @@@@@@@@ @@@@@@@@@@@@@
783 @@@@@@ @@@@@@@@@@@@@@@
784 0000 @@@@@@@@@@@@@@@@@@@@@
785 000000000 @@@@@@@@@@@@@@@@@@@
786 0000000000000000000 @@@@@@@@@@@@@@@
787 00000000000000000000 @@@@@@@@@@@@@@@
788 000000000 @@@@@@@@@@@@@@@
792 @@@@@@@@@@@@@@@@@@ @@@@
793 @@@@@@@@@@@@@@@@@@@ @@@@@@@
794 @@@ @@@@ @@@ @@@@@@@@@@
795 @@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@
796 @@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ @@@@@@@@ @@ @@@@@@@@@@@@@@@
797 @@@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@@@@@@@@
798 @@@@@@@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@@@@@@@@@@@@
799 @@@@@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@ @@@@@@@@@@@@
800 @@@@@@@@@@@@@@@@@@@@ @@@@@@ @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@@@
801 @@@@@@@@@@@@@@@@@ @@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@ @@@@@@
802 @@@@@@@@@ @@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@ @@ @@@@@ @@@@@@@@
803 @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @@@@@@ @@@@ @@@@@@
804 @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @@@@@@ @@@@@@ @@@@@@
805 @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @@@@@@@@ @@@@
806 @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @ @@@@@
807 @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@ @@@@@ @@@@ ////
808 //////////// @@@@@@@@@@@ @@@@@@ @@@@@@@@@@@@@@@@@@@@ @@ @@@@@@@@@ @@@@ //// ////////////
809 ///////////////// /// @@@@@ @@@@ @@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@ ///// /////// /////////
810 ///////////////////// ///// @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@@@ @ @@@@ ////// /////// ///////////////
811 ///////////////////////// /////// @@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@ @@@@ ////// //////// ////////////////////
812 //////////////////////////// ////////// @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@ @@@@@@@@@ @@@ ////// ////////// ////////////////////////
813 //////////////////// ////////// /////////// @@@@@@@@@@@@@@@@@ @@@@@@@@ @@@ @@@@@@ ////// //////////// //////////////////////////
814 //////////////////// //////////// /////////// @@@@@@@@@@@@@@@@ @@@@ ///////////////////// /////////////////////////////
815 ///////////////////// ////////////// ////// @@@@@@@@@ ///////////////////////////////////////////////////////////
816 //////////////////// ///////////////////////////////////// ///////////////////////////////////////////////////////////////////////
817 ///////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////
818 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
819 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
820 /////////////////////////////////////////////////////////////////////////////////////////
821 //////////////////////////////////////////////////////////
823 #endif // USE_PROTOBUF_USERMESSAGES