Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ where cmake >NUL 2>NUL
IF %ERRORLEVEL% == 0 GOTO build

SET PATH=%PATH%;C:\Program Files\CMake\bin\
:: VS2026
SET PATH=%PATH%;C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\
SET PATH=%PATH%;C:\Program Files\Microsoft Visual Studio\18\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\
SET PATH=%PATH%;C:\Program Files\Microsoft Visual Studio\18\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\
:: VS2022
SET PATH=%PATH%;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\
SET PATH=%PATH%;C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\
SET PATH=%PATH%;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\
:: VS2019
SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\
SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\
SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\
Expand Down
29 changes: 4 additions & 25 deletions compiler/back-ends/c++-gen/gen-code.c
Original file line number Diff line number Diff line change
Expand Up @@ -2212,8 +2212,7 @@ void PrintChoiceDefCodeJsonEnc(FILE* src, FILE* hdr, Module* m, CxxRules* r, Typ
fprintf(src, "void %s::JEnc(SJson::Value& b) const\n", td->cxxTypeDefInfo->className);
fprintf(src, "{\n");
/* print local vars */
fprintf(src, "\tb = SJson::Value(SJson::objectValue);\n\n");
fprintf(src, "\tSJson::Value tmp;\n\n");
fprintf(src, "\tb = SJson::Value(SJson::objectValue);\n");

/* print local vars */

Expand All @@ -2234,9 +2233,7 @@ void PrintChoiceDefCodeJsonEnc(FILE* src, FILE* hdr, Module* m, CxxRules* r, Typ
/* encode content */
fprintf(src, "\t\t\t%s", varName);
fprintf(src, "%s", getAccessor(cxxtri->isPtr));
fprintf(src, "JEnc(tmp);\n");
fprintf(src, "\t\t\tb[\"%s\"] = tmp;\n", varName);

fprintf(src, "JEnc(b[\"%s\"]);\n", varName);
fprintf(src, "\t\tbreak;\n");
}
}
Expand All @@ -2262,7 +2259,6 @@ void PrintChoiceDefCodeJsonDec(FILE* src, FILE* hdr, Module* m, CxxRules* r, Typ

fprintf(src, "\tif (!b.isObject())\n");
fprintf(src, "\t\treturn false;\n\n");
fprintf(src, "\tSJson::Value tmp;\n");

FOR_EACH_LIST_ELMT(e, choice->basicType->a.choice)
{
Expand Down Expand Up @@ -3409,11 +3405,9 @@ void PrintSeqDefCodeJsonEnc(FILE* src, FILE* hdr, Module* m, TypeDef* td, Type*
fprintf(hdr, "\tvoid JEnc(SJson::Value& b) const override;\n");
fprintf(src, "void %s::JEnc(SJson::Value& b) const\n", td->cxxTypeDefInfo->className);
fprintf(src, "{\n");
fprintf(src, "\tb = SJson::Value(SJson::objectValue);\n\n");
fprintf(src, "\tSJson::Value tmp;\n\n");
fprintf(src, "\tb = SJson::Value(SJson::objectValue);\n");

NamedType* e;
bool bFirst = true;
FOR_EACH_LIST_ELMT(e, seq->basicType->a.sequence)
{
const CxxTRI* cxxtri = e->type->cxxTypeRefInfo;
Expand All @@ -3424,10 +3418,6 @@ void PrintSeqDefCodeJsonEnc(FILE* src, FILE* hdr, Module* m, TypeDef* td, Type*

if (e->type->basicType->choiceId != BASICTYPE_EXTENSION)
{
if (bFirst)
bFirst = false;
else
fprintf(src, "\n");
/* print optional test if nec */
if (e->type->defaultVal != NULL)
{
Expand All @@ -3442,7 +3432,6 @@ void PrintSeqDefCodeJsonEnc(FILE* src, FILE* hdr, Module* m, TypeDef* td, Type*
case BASICTYPE_INTEGER:
case BASICTYPE_ENUMERATED:
fprintf(src, "\tif ( %s(%s) && *%s != %d )\n", cxxtri->optTestRoutineName, varName, varName, defVal->basicValue->a.integer);
fprintf(src, "\t{\n");
break;
case BASICTYPE_BITSTRING:
{
Expand All @@ -3456,13 +3445,11 @@ void PrintSeqDefCodeJsonEnc(FILE* src, FILE* hdr, Module* m, TypeDef* td, Type*
{
// check for default bit.
fprintf(src, "\tif ( %s(%s) && (! %s->soloBitCheck(%s::%s)) )\n", cxxtri->optTestRoutineName, varName, varName, cxxtri->className, defBitStr);
fprintf(src, "\t{\n");
}
else
{
// if default is empty then check for empty
fprintf(src, "\tif ( %s(%s) && (! %s->IsEmpty()) ){", cxxtri->optTestRoutineName, varName, varName);
fprintf(src, "\t{\n");
}

// RWC;ALLOW "}" alignment using editor...
Expand All @@ -3474,7 +3461,6 @@ void PrintSeqDefCodeJsonEnc(FILE* src, FILE* hdr, Module* m, TypeDef* td, Type*
break;
case BASICTYPE_BOOLEAN:
fprintf(src, "\tif (%s(%s) && *%s != %s)\n", cxxtri->optTestRoutineName, varName, varName, defVal->basicValue->a.boolean ? "true" : "false");
fprintf(src, "\t{\n");
// RWC;ALLOW "}" alignment using editor...
break;
default:
Expand All @@ -3485,7 +3471,6 @@ void PrintSeqDefCodeJsonEnc(FILE* src, FILE* hdr, Module* m, TypeDef* td, Type*
else if (e->type->optional)
{
fprintf(src, "\tif (%s(%s))\n", cxxtri->optTestRoutineName, varName);
fprintf(src, "\t{\n");
// RWC;ALLOW "}" alignment using editor...
}

Expand All @@ -3494,12 +3479,7 @@ void PrintSeqDefCodeJsonEnc(FILE* src, FILE* hdr, Module* m, TypeDef* td, Type*
/* encode content */
fprintf(src, "%s%s", szIndent, varName);
fprintf(src, "%s", getAccessor(cxxtri->isPtr));
fprintf(src, "JEnc(tmp);\n");
fprintf(src, "%sb[\"%s\"] = tmp;\n", szIndent, varName);

/* close optional test if nec */
if (e->type->optional || e->type->defaultVal != NULL)
fprintf(src, "\t}\n");
fprintf(src, "JEnc(b[\"%s\"]);\n", varName);
}
}

Expand All @@ -3517,7 +3497,6 @@ void PrintSeqDefCodeJsonDec(FILE* src, FILE* hdr, Module* m, TypeDef* td, Type*
fprintf(src, "\tClear();\n\n");
fprintf(src, "\tif (!b.isObject())\n");
fprintf(src, "\t\treturn false;\n\n");
fprintf(src, "\tSJson::Value tmp;\n");

NamedType* e;
FOR_EACH_LIST_ELMT(e, seq->basicType->a.sequence)
Expand Down
2 changes: 1 addition & 1 deletion compiler/back-ends/ts-gen/gluecode/SNACCROSE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* SNACCROSE.ts
* "SNACC-ROSE" ASN.1 stubs.
* This file was generated by estos esnacc (V6.0.26, 17.04.2025)
* This file was generated by estos esnacc (V6.0.36, 12.01.2026)
* based on Coral WinSnacc written by Deepak Gupta
* NOTE: This is a machine generated file - editing not recommended
*/
Expand Down
2 changes: 1 addition & 1 deletion compiler/back-ends/ts-gen/gluecode/SNACCROSE_Converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* SNACCROSE_Converter.ts
* "SNACC-ROSE" ASN.1 stubs.
* This file was generated by estos esnacc (V6.0.26, 17.04.2025)
* This file was generated by estos esnacc (V6.0.36, 12.01.2026)
* based on Coral WinSnacc written by Deepak Gupta
* NOTE: This is a machine generated file - editing not recommended
*/
Expand Down
3 changes: 2 additions & 1 deletion cpp-lib/include/SNACCROSE.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SNACCROSE.h - class definitions for ASN.1 module SNACC-ROSE
//
// This file was generated by estos esnacc (V6.0.26, 17.04.2025)
// This file was generated by estos esnacc (V6.0.36, 12.01.2026)
// based on Coral WinSnacc written by Deepak Gupta
// NOTE: This is a machine generated file - editing not recommended
//
Expand Down Expand Up @@ -245,6 +245,7 @@ class ROSEError : public AsnType
// [PrintCxxListClass]
class ROSEAuthList : public AsnSeqOf<ROSEAuth>
{
public:
ROSEAuthList* Clone() const override;
const char* typeName() const override;
};
Expand Down
2 changes: 1 addition & 1 deletion cpp-lib/jsoncpp/include/value.h
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ inline const Value& Value::back() const { return *(--end()); }

inline Value& Value::back() { return *(--end()); }

} // namespace Sson
} // namespace SJson

#pragma pack(pop)

Expand Down
2 changes: 1 addition & 1 deletion cpp-lib/jsoncpp/json_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ Value::Value(ValueType type) {
initBasic(type);
switch (type) {
case nullValue:
break;
case intValue:
case uintValue:
value_.int_ = 0;
Expand Down Expand Up @@ -1033,6 +1032,7 @@ void Value::releasePayload() {
case arrayValue:
case objectValue:
delete value_.map_;
value_.map_ = nullptr;
break;
default:
JSON_ASSERT_UNREACHABLE;
Expand Down
Loading