Skip to content

Commit

Permalink
Adding template main files for algorithm and io processors
Browse files Browse the repository at this point in the history
  • Loading branch information
grf14003 committed Feb 11, 2020
1 parent 6a9e7bd commit c2eee1e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
19 changes: 19 additions & 0 deletions breadcrumbs/src/template/AlgorithmTemplate.cpp.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

#include <stdio.h>
#include "Config.hpp"

#include "@Bfs_TEMP_ALGORITHM_NAME@.hpp"


int main()
{
Algorithm* algorithm = new @Bfs_TEMP_ALGORITHM_NAME@(@Bfs_TEMP_ALGORITHM_CLIENT_LIMIT@);

// Loop
while (algorithm->loopCondition())
{
algorithm->loop();
}

return 0;
}
23 changes: 23 additions & 0 deletions breadcrumbs/src/template/IOProcessorTemplate.cpp.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

#include <iostream>

#include "DataSyncThread.hpp"
#include "@Bfs_TEMP_IOPROC_NAME@.hpp"


int main()
{
IOProcessor* client = new @Bfs_TEMP_IOPROC_NAME@;

if (!client->init())
{
while (client->loopCondition())
client->loop();

int result = client->close();
delete client;
return result;
}

return 1;
}

0 comments on commit c2eee1e

Please sign in to comment.