Changeset 135 for cpp


Ignore:
Timestamp:
02/17/14 12:32:11 (11 years ago)
Author:
sz
Message:

neuron layout algorithm (for schematic drawing), usage example in frams/_demos/neuro_layout_test.cpp

Location:
cpp
Files:
7 added
5 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/nonstd.h

    r123 r135  
    5555  #define stricmp(a,b) strcasecmp(a,b)
    5656 #endif
    57 #ifdef INITIAL_DIR_IS_HOME
    58  #include "cwd.h"
    59  #define GET_APP_HOME getAppHome()
    60 #else
    61  #define GET_APP_HOME "./"
    62 #endif
    63 #ifdef INITIAL_DIR_IS_RES
    64  #include "cwd.h"
    65  #define GET_APP_RESOURCES getAppResources()
    66 #else
    67  #define GET_APP_RESOURCES "./"
    68 #endif
    6957#endif
    7058
     
    9684#endif
    9785
     86#ifdef LINUX
     87 #define GET_APP_HOME "./"
     88 #define GET_APP_RESOURCES "./"
     89#endif
     90
    9891#if defined(_WIN32) && !defined(SHP)
    9992    #define GET_APP_HOME ".\\"
     
    10194#endif
    10295
     96#ifdef INITIAL_DIR_IS_HOME
     97 #include "cwd.h"
     98 #ifdef GET_APP_HOME
     99  #undef GET_APP_HOME
     100 #endif
     101 #define GET_APP_HOME getAppHome()
     102#endif
    103103
    104 
     104#ifdef INITIAL_DIR_IS_RES
     105 #include "cwd.h"
     106 #ifdef GET_APP_RESOURCES
     107  #undef GET_APP_RESOURCES
     108 #endif
     109 #define GET_APP_RESOURCES getAppResources()
     110#endif
    105111
    106112//typedef unsigned char boolean; //niestety nie mozna uzyc 'bool' bo VC w rpcndr.h wlasnie tak definiuje booleana, jako unsigned char
  • cpp/common/nonstd_math.cpp

    r122 r135  
    1414
    1515
    16 #ifdef _WIN32 //http://stackoverflow.com/questions/2170385/c-math-functions
    17 double round(double val)
     16#if defined __BORLANDC__ || (_MSC_VER <= 1700)
     17double round(double val) //http://stackoverflow.com/questions/2170385/c-math-functions
    1818{   
    1919    return floor(val + 0.5);
  • cpp/common/nonstd_math.h

    r122 r135  
    1717#endif
    1818
    19 #ifdef _WIN32 //http://stackoverflow.com/questions/2170385/c-math-functions
    20 double round(double val);
     19#if defined __BORLANDC__ || (_MSC_VER <= 1700)
     20double round(double val);  //http://stackoverflow.com/questions/2170385/c-math-functions
    2121#endif
    2222
  • cpp/frams/Makefile-GDK

    r109 r135  
    55include frams/Makefile-GDK-files
    66
    7 GDK_TESTS=conv_test gdk_test geno_test neuro_test loader_test serial_test multiline_f0_test f0_variants_test full_props part_shapes
     7GDK_TESTS=conv_test gdk_test geno_test neuro_test loader_test serial_test multiline_f0_test f0_variants_test full_props part_shapes neuro_layout_test
    88
    99gdk_tests: $(GDK_TESTS)
     
    4444        $(CXX) $(PART_SHAPES_OBJS) -o $@
    4545
     46neuro_layout_test: $(NEURO_LAYOUT_TEST_OBJS)
     47        $(CXX) $(NEURO_LAYOUT_TEST_OBJS) -o $@
     48
    4649#############################################
    4750
    48 ALL_OBJS=$(GDK_TEST_OBJS) $(CONV_TEST_OBJS) $(GENO_TEST_OBJS) $(NEURO_TEST_OBJS) $(LOADER_TEST_OBJS) $(SERIAL_TEST_OBJS) $(MULTILINE_F0_OBJS) $(F0_VARIANTS_OBJS) $(FULL_PROPS_OBJS) $(PART_SHAPES_OBJS)
     51ALL_OBJS=$(GDK_TEST_OBJS) $(CONV_TEST_OBJS) $(GENO_TEST_OBJS) $(NEURO_TEST_OBJS) $(LOADER_TEST_OBJS) $(SERIAL_TEST_OBJS) $(MULTILINE_F0_OBJS) $(F0_VARIANTS_OBJS) $(FULL_PROPS_OBJS) $(PART_SHAPES_OBJS) $(NEURO_LAYOUT_TEST_OBJS)
    4952
    5053include frams/Makefile-maintain
  • cpp/frams/Makefile-GDK-files

    r126 r135  
    22
    33# ALL_DIRS is later expanded by the shell, no spaces/newlines allowed, or it breaks
    4 ALL_DIRS={common,frams,frams/config,frams/errmgr,frams/genetics,frams/genetics/f0,frams/genetics/f1,frams/genetics/f2,frams/genetics/f3,frams/genetics/f4,frams/genetics/f5,frams/genetics/f6,frams/genetics/f7,frams/genetics/f8,frams/genetics/f9,frams/model,frams/neuro,frams/neuro/impl,frams/param,frams/test,frams/util,frams/vm/classes,frams/virtfile,frams/_demos}
     4ALL_DIRS={common,frams,frams/canvas,frams/config,frams/errmgr,frams/genetics,frams/genetics/f0,frams/genetics/f1,frams/genetics/f2,frams/genetics/f3,frams/genetics/f4,frams/genetics/f5,frams/genetics/f6,frams/genetics/f7,frams/genetics/f8,frams/genetics/f9,frams/model,frams/neuro,frams/neuro/impl,frams/param,frams/test,frams/util,frams/vm/classes,frams/virtfile,frams/_demos}
    55
    66GENOCONV_GDK_OBJS=frams/genetics/f1/conv_f1.o frams/genetics/f9/conv_f9.o
     
    3333PART_SHAPES_OBJS= frams/_demos/part_shapes.o frams/virtfile/virtfile.o  $(GDK_OBJS) $(GENOCONV_GDK_OBJS)
    3434
     35NEURO_LAYOUT_TEST_OBJS= frams/_demos/neuro_layout_test.o frams/virtfile/virtfile.o frams/errmgr/stdouterr.o $(GDK_OBJS) $(GENOCONV_GDK_OBJS) frams/canvas/nn_layout_model.o frams/canvas/nn_simple_layout.o frams/canvas/nn_smart_layout.o
Note: See TracChangeset for help on using the changeset viewer.