Commit 571ad185 authored by denis's avatar denis

Update src/class_stoploss_list.c

parent 7f714170
Pipeline #123718286 failed with stage
in 1 minute and 12 seconds
/* class_signal_list.c
* Implements a "class"-like struct in C which handles signal lists
/* class_stoploss_list.c
* Implements a "class"-like struct in C which handles SL lists
* This file is part of ichinscratchy
* Copyright (C) 2016-2020 Denis Zetzmann [email protected]
*
......@@ -19,11 +18,11 @@
*/
/**
* @file class_signal_list.c
* @brief routines to handle signal_list data structure
* @file class_stoploss_list.c
* @brief routines to handle stoploss_list data structure
*
* This file contains the functions which dealt with creating, destroying and
* copying signal_list structs
* copying stoploss_list structs
*/
// #include <stdlib.h>
......@@ -54,32 +53,32 @@
///////////////////////////////////////////////////////////////////////////////
/**
* @brief Creates a signal_list object
* @brief Creates a stoploss_list object
*
* This function creates a signal_list struct, allocates memory and initializes
* This function creates a stoploss_list struct, allocates memory and initializes
* some of its components
*
* @param listname char pointer with name of this list
* @return pointer to new signal_list object
* @return pointer to new stoploss_list object
*/
///////////////////////////////////////////////////////////////////////////////
// class_signal_list *class_signal_list_init(char* listname)
// {
// class_signal_list* self = NULL;
//
// // allocate memory
// self = ZCALLOC(1, sizeof(class_signal_list));
//
// // bugfix: do not allocate memory for vector of inherited objects (there are none at this point)
class_stoploss_list *class_stoploss_list_init(char* listname)
{
class_stoploss_list* self = NULL;
// allocate memory
self = ZCALLOC(1, sizeof(class_sstoploss_list));
// bugfix: do not allocate memory for vector of inherited objects (there are none at this point)
// // self->Sig = (class_signal**)ZCALLOC(1,sizeof(class_signal));
// self->Sig = NULL;
//
// // allocate memory for rest of components
// self->name = init_1d_array_bstring(1);
//
// // init data;
// *self->name = bfromcstr(listname);
// self->nr_signals = 0;
self->SL = NULL;
// allocate memory for rest of components
self->name = init_1d_array_bstring(1);
// init data;
*self->name = bfromcstr(listname);
self->nr_records = 0;
//
// // set methods
// class_signalList_setMethods(self);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment