Changeset 104 for cpp/gdk/modelparts.h


Ignore:
Timestamp:
07/23/13 18:15:30 (11 years ago)
Author:
sz
Message:

introducing object de/serialization - see serialtest.cpp
the core GDK classes can be now used in multiple threads (ifdef MULTITHREADED)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/gdk/modelparts.h

    r81 r104  
    3535PartBase(const SString& s):vis_style(s),mapped(0) {}
    3636~PartBase();
    37 static const SString& getDefaultStyle(){static SString s("none"); return s;}
     37static SString getDefaultStyle(){return SString("none");}
    3838MultiRange *mapped;
    3939enum PartBaseFlags { Selected=1 };
     
    6868{
    6969friend class Model;
    70 static const SString& getDefaultStyle();
     70static SString getDefaultStyle();
    7171Part(double _mass,double _size,double _density,double _friction,double _ingest,double _assim)
    72         :mass(_mass),size(_size),density(_density),friction(_friction),ingest(_ingest),assim(_assim),
    73         PartBase(getDefaultStyle())
     72        :PartBase(getDefaultStyle()),mass(_mass),size(_size),density(_density),friction(_friction),ingest(_ingest),assim(_assim)
    7473        {}
    7574public:
     
    7877Orient o;  ///< orientation in 3d space (rotation matrix)
    7978/// ParamInterface object is preferred way to get/set other properties.
    80 ParamInterface &extraProperties();
    81 ParamInterface &properties();
     79Param extraProperties();
     80Param properties();
    8281long refno;
    8382Pt3D rot;
     
    104103{
    105104friend class Model;
    106 static const SString& getDefaultStyle();
     105SString getDefaultStyle();
    107106Joint(double _stamina,double _stif,double _rotstif,double _d)
    108         :stamina(_stamina),stif(_stif),rotstif(_rotstif),PartBase(getDefaultStyle())
     107        :PartBase(getDefaultStyle()),stamina(_stamina),stif(_stif),rotstif(_rotstif)
    109108        {d=Pt3D(_d,0,0);}
    110109public:
     
    144143
    145144/// ParamInterface object is preferred way to get/set other properties.
    146 ParamInterface &extraProperties();
    147 ParamInterface &properties();
     145Param extraProperties();
     146Param properties();
    148147
    149148// do not touch these:
     
    182181long visualhints;
    183182
    184 void *impl;
     183//void *impl;
     184int impl_count;
    185185bool active;
    186186int genactive;
     
    290290{
    291291friend class Model;
    292 static const SString& getDefaultStyle();
     292static SString getDefaultStyle();
    293293
    294294struct NInput { Neuro *n; double weight; SString *info;
     
    307307public:
    308308enum NeuroFlags { HoldState=2 };
    309 ParamInterface &properties();
    310 ParamInterface &extraProperties();
     309Param properties();
     310Param extraProperties();
    311311
    312312void setInputInfo(int i,const SString& name,const SString &value);
Note: See TracChangeset for help on using the changeset viewer.