Click here to Skip to main content
15,886,724 members
Articles / Desktop Programming / MFC

The Diffraction Grating Calculator

Rate me:
Please Sign up or sign in to vote.
4.40/5 (5 votes)
30 Oct 2010GPL38 min read 41.4K   678   6  
An MFC Windows program related to Concave Diffraction Gratings using VTK libraries.
// attribute_generic.cpp: implementation of the base abstract class

#include "stdafx.h"
#include "attribute_generic.h"

// Construction/Destruction

CAttribute_Generic::CAttribute_Generic(int index)
{
	m_attribute_idx = index;
   Units = _T("[N/A]");
}

CAttribute_Generic::~CAttribute_Generic()
{
}

void CAttribute_Generic::GetClassName(CString& szDummy)
{
	try
	{
		szDummy = ClassName;
	}
	catch (...) {
	}
}

void CAttribute_Generic::GetKind(CString& szDummy)
{
	try
	{
		szDummy = Kind;
	}
	catch (...) {
	}
}

void  CAttribute_Generic::GetSize(size_t& nDummy)
{
	try
	{
		nDummy = m_size;
	}
	catch (...) {
	}
}

void CAttribute_Generic::GetIndex(int& nDummy)
{
	try
	{
		nDummy = m_attribute_idx;
	}
	catch (...) {
	}
}

void CAttribute_Generic::GetUnits(CString& szDummy)
{
   try
   {
      szDummy = Units;
   }
   catch (...) {
   }
}

void CAttribute_Generic::SetUnits(CString  szDummy)
{
   try
   {
      Units = szDummy;
   }
   catch (...) {
   }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer (Senior)
Italy Italy
Senior Software Developer in C/C++ and Oracle.
Ex-physicist holding a Ph.D. on x-ray lasers.

Comments and Discussions