/*
 *  This file was generated by the SOM Compiler and Emitter Framework.
 *  Generated using template emitter:
 *      SOM Emitter emitctm: 2.23.1.9
 */

#ifndef SOM_Module_student_Source
#define SOM_Module_student_Source
#endif
#define Student_Class_Source

#include "student.ih"

#include <stdio.h>
#include <string.h>

/*
 * sets up a new student
 */

SOM_Scope void  SOMLINK setUpStudent(Student *somSelf, char *id,
                                     char *name)
{
    StudentData *somThis = StudentGetData(somSelf);
    StudentMethodDebug("Student","setUpStudent");

    strcpy(_id, id);
    strcpy(_name, name);
}

/*
 * prints the student information
 */

SOM_Scope void  SOMLINK printStudentInfo(Student *somSelf)
{
    StudentData *somThis = StudentGetData(somSelf);
    StudentMethodDebug("Student","printStudentInfo");

    printf(" Id : %s\n", _id);
    printf(" Name : %s\n", _name);
    printf(" Type : %s\n", _getStudentType(somSelf));
}

/*
 * returns the student type
 */

SOM_Scope char*  SOMLINK getStudentType(Student *somSelf)
{
    static char *type = "student";
    StudentData *somThis = StudentGetData(somSelf);
    StudentMethodDebug("Student","getStudentType");

    return type;
}

/*
 * returns the student ID
 */

SOM_Scope char*  SOMLINK getStudentId(Student *somSelf)
{
    StudentData *somThis = StudentGetData(somSelf);
    StudentMethodDebug("Student","getStudentId");

    return _id;
}
