// file: phn_size_0.cc
//

// isip include files
//
#include "phone.h"
#include "phone_constants.h"

// method: size_cc
//
// arguments: none
//
// return: an int_4 with number of bytes used by this object
//
// this method counts the size of the current object in bytes
//
int_4 Phone::size_cc() {

  // set the size variable
  //
  int_4 size = (int_4)0;
  
  // add the size of each constituent data
  //
  size += (int_4)(strlen((char*)name_d) + 1) * sizeof(char_1);  // name_d
  size += sizeof(int_4);                    // num_phones_d
  size += num_phones_d * sizeof(int_4);     // phones array
  size += sizeof(Model*);                   // model_d
  
  // exit gracefully
  //
  return size;
}
