Skip to content
Snippets Groups Projects
Select Git revision
  • 2ddaf54834b7f1d56725e1835b1e10dfa5750967
  • main default protected
  • oleg-alexandrov-patch-1
  • radtan
  • 2.0
  • Kelvinrr-patch-1
  • acpaquette-patch-1
  • gxp_testing
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 1.7.0
  • 1.6.0
  • 1.5.2
  • 1.5.1
  • 1.5.0
  • 1.4.1
  • 1.4.0
  • 1.3.1
  • 1.3.0
  • 1.2.0
  • 1.1.1
  • 1.1.0
  • 1.0.0
24 results

UsgsAstroLsSensorModel.cpp

Blame
  • Field.cpp 852 B
    /**
     * @(#) Field.cpp
     */
    
    #include "Field.h"
    #include "Utility.h"
    
    using namespace PacketLib;
    
    
    
    //##ModelId=3C0F6C1A0001
    Field::Field(char* n, char* dim, char* prVal, int count) : progressiv(count)
    {
        #ifndef NOFIELDSNAME
        //cout << "define field name" << endl;
        //name
        dword l = strlen(n);
        l++;
        name = (char*)malloc(sizeof(char)*l);
        memcpy(name, n, l);
        #endif
    
        dimension = atoi(dim);
        if(strcmp(prVal, "none") != 0)
        {
            thereIsPredefinedValue = true;
            predefinedValue = Utility::convertToInteger(prVal);
        }
        else
        {
            predefinedValue = 0;
            thereIsPredefinedValue = false;
        }
    }
    
    
    //##ModelId=3ACCD75E036B
    Field::~Field()
    {
        //	cout << "deleted field: " << name << endl;
        #ifndef NOFIELDSNAME
        free(name);
        #endif
    }