refactor(rt/c++): rename root namespace (_program → xod)

This commit is contained in:
Victor Nakoryakov
2017-07-27 17:37:21 +03:00
parent 675d87b3f1
commit ca84690248
10 changed files with 40 additions and 40 deletions

View File

@@ -8,7 +8,7 @@
*
=============================================================================*/
namespace _program {
namespace xod {
{{#each this}}
//-----------------------------------------------------------------------------
@@ -21,4 +21,4 @@ namespace {{ owner }}__{{ libName }}__{{ patchName }} {
} // namespace {{ owner }}__{{ libName }}__{{ patchName }}
{{/each}}
} // namespace _program
} // namespace xod

View File

@@ -8,7 +8,7 @@
*
=============================================================================*/
namespace _program {
namespace xod {
{{#each nodes}}
{{mergePins }}
{{#each outputs }}

View File

@@ -32,7 +32,7 @@
#define PIN_KEY_OFFSET_BITS (16 - MAX_OUTPUT_COUNT)
#define NO_NODE ((NodeId)-1)
namespace _program {
namespace xod {
typedef double Number;
typedef bool Logic;
@@ -72,7 +72,7 @@ namespace _program {
//----------------------------------------------------------------------------
// Engine
//----------------------------------------------------------------------------
namespace _program {
namespace xod {
extern void* storages[NODE_COUNT];
extern EvalFuncPtr evaluationFuncs[NODE_COUNT];
extern DirtyFlags dirtyFlags[NODE_COUNT];
@@ -261,6 +261,6 @@ void setup() {
}
void loop() {
_program::idle();
_program::runTransaction();
xod::idle();
xod::runTransaction();
}

View File

@@ -60,7 +60,7 @@ Handlebars.registerHelper('global', function global(options) {
'// --- Enter global namespace ---',
'}}',
options.fn(this),
'namespace _program {',
'namespace xod {',
`namespace ${this.owner}__${this.libName}__${this.patchName} {`,
'// --- Back to local namespace ---',
].join('\n');

View File

@@ -6,7 +6,7 @@
*
=============================================================================*/
namespace _program {
namespace xod {
//-----------------------------------------------------------------------------
// xod/math/multiply implementation
@@ -38,4 +38,4 @@ void evaluate(Context ctx) {
} // namespace xod__math__multiply
} // namespace _program
} // namespace xod

View File

@@ -6,7 +6,7 @@
*
=============================================================================*/
namespace _program {
namespace xod {
NodeId links_0_OUT[] = { 1, NO_NODE };
xod__math__multiply::Storage storage_0 = {

View File

@@ -671,7 +671,7 @@ template <typename T> class List {
#define PIN_KEY_OFFSET_BITS (16 - MAX_OUTPUT_COUNT)
#define NO_NODE ((NodeId)-1)
namespace _program {
namespace xod {
typedef double Number;
typedef bool Logic;
@@ -711,7 +711,7 @@ namespace _program {
//----------------------------------------------------------------------------
// Engine
//----------------------------------------------------------------------------
namespace _program {
namespace xod {
extern void* storages[NODE_COUNT];
extern EvalFuncPtr evaluationFuncs[NODE_COUNT];
extern DirtyFlags dirtyFlags[NODE_COUNT];
@@ -900,8 +900,8 @@ void setup() {
}
void loop() {
_program::idle();
_program::runTransaction();
xod::idle();
xod::runTransaction();
}
/*=============================================================================
@@ -912,7 +912,7 @@ void loop() {
*
=============================================================================*/
namespace _program {
namespace xod {
//-----------------------------------------------------------------------------
// xod/core/clock implementation
@@ -1072,7 +1072,7 @@ void evaluate(Context ctx) {
} // namespace xod__core__constant_number
} // namespace _program
} // namespace xod
/*=============================================================================
*
@@ -1082,7 +1082,7 @@ void evaluate(Context ctx) {
*
=============================================================================*/
namespace _program {
namespace xod {
NodeId links_0_TICK[] = { 1, NO_NODE };
xod__core__clock::Storage storage_0 = {

View File

@@ -671,7 +671,7 @@ template <typename T> class List {
#define PIN_KEY_OFFSET_BITS (16 - MAX_OUTPUT_COUNT)
#define NO_NODE ((NodeId)-1)
namespace _program {
namespace xod {
typedef double Number;
typedef bool Logic;
@@ -711,7 +711,7 @@ namespace _program {
//----------------------------------------------------------------------------
// Engine
//----------------------------------------------------------------------------
namespace _program {
namespace xod {
extern void* storages[NODE_COUNT];
extern EvalFuncPtr evaluationFuncs[NODE_COUNT];
extern DirtyFlags dirtyFlags[NODE_COUNT];
@@ -900,8 +900,8 @@ void setup() {
}
void loop() {
_program::idle();
_program::runTransaction();
xod::idle();
xod::runTransaction();
}
/*=============================================================================
@@ -912,7 +912,7 @@ void loop() {
*
=============================================================================*/
namespace _program {
namespace xod {
//-----------------------------------------------------------------------------
// xod/core/clock implementation
@@ -1072,7 +1072,7 @@ void evaluate(Context ctx) {
} // namespace xod__core__constant_number
} // namespace _program
} // namespace xod
/*=============================================================================
*
@@ -1082,7 +1082,7 @@ void evaluate(Context ctx) {
*
=============================================================================*/
namespace _program {
namespace xod {
NodeId links_0_TICK[] = { 2, NO_NODE };
xod__core__clock::Storage storage_0 = {

View File

@@ -671,7 +671,7 @@ template <typename T> class List {
#define PIN_KEY_OFFSET_BITS (16 - MAX_OUTPUT_COUNT)
#define NO_NODE ((NodeId)-1)
namespace _program {
namespace xod {
typedef double Number;
typedef bool Logic;
@@ -711,7 +711,7 @@ namespace _program {
//----------------------------------------------------------------------------
// Engine
//----------------------------------------------------------------------------
namespace _program {
namespace xod {
extern void* storages[NODE_COUNT];
extern EvalFuncPtr evaluationFuncs[NODE_COUNT];
extern DirtyFlags dirtyFlags[NODE_COUNT];
@@ -900,8 +900,8 @@ void setup() {
}
void loop() {
_program::idle();
_program::runTransaction();
xod::idle();
xod::runTransaction();
}
/*=============================================================================
@@ -912,7 +912,7 @@ void loop() {
*
=============================================================================*/
namespace _program {
namespace xod {
//-----------------------------------------------------------------------------
// xod/core/system_time implementation
@@ -951,7 +951,7 @@ namespace xod__common_hardware__text_lcd_16x2 {
}}
#include <LiquidCrystal.h>
namespace _program {
namespace xod {
namespace xod__common_hardware__text_lcd_16x2 {
// --- Back to local namespace ---
struct State {
@@ -1119,7 +1119,7 @@ void evaluate(Context ctx) {
} // namespace xod__core__constant_string
} // namespace _program
} // namespace xod
/*=============================================================================
*
@@ -1129,7 +1129,7 @@ void evaluate(Context ctx) {
*
=============================================================================*/
namespace _program {
namespace xod {
NodeId links_0_TIME[] = { 2, NO_NODE };
xod__core__system_time::Storage storage_0 = {

View File

@@ -671,7 +671,7 @@ template <typename T> class List {
#define PIN_KEY_OFFSET_BITS (16 - MAX_OUTPUT_COUNT)
#define NO_NODE ((NodeId)-1)
namespace _program {
namespace xod {
typedef double Number;
typedef bool Logic;
@@ -711,7 +711,7 @@ namespace _program {
//----------------------------------------------------------------------------
// Engine
//----------------------------------------------------------------------------
namespace _program {
namespace xod {
extern void* storages[NODE_COUNT];
extern EvalFuncPtr evaluationFuncs[NODE_COUNT];
extern DirtyFlags dirtyFlags[NODE_COUNT];
@@ -900,8 +900,8 @@ void setup() {
}
void loop() {
_program::idle();
_program::runTransaction();
xod::idle();
xod::runTransaction();
}
/*=============================================================================
@@ -912,7 +912,7 @@ void loop() {
*
=============================================================================*/
namespace _program {
namespace xod {
//-----------------------------------------------------------------------------
// xod/core/gate implementation
@@ -1131,7 +1131,7 @@ void evaluate(Context ctx) {
} // namespace xod__core__constant_number
} // namespace _program
} // namespace xod
/*=============================================================================
*
@@ -1141,7 +1141,7 @@ void evaluate(Context ctx) {
*
=============================================================================*/
namespace _program {
namespace xod {
NodeId links_0_T[] = { NO_NODE };
NodeId links_0_F[] = { 2, NO_NODE };