/***********************************************************************
*           See Accompanying licence file QSAS_licence                 *
***********************************************************************/

#ifndef _QAR_H_  
#define _QAR_H_

/* include files */

#include <iostream>
#include <cstddef> 
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cmath>
#include <cctype>
#include "Qdos.h"
#include "qdutil.h"
#include "qplug_if.h"

#include "qunit_if.h"
  
 
using namespace QSAS;

/* environment variables */


/* messages */

#define QAR_OK 0
#define QAR_ERR 1
#define QAR_WARN 2


/* prototypes */

QdObject_var QarConvertUnitsTo(QdObject_var ptr, const char * SIcTarget, const char* newUnits="");

double QarConvFactor(const char * SIc);

double Qar_atof(const char * vtxt);

bool QarSameBaseSI(const char *SIc1, const char *SIc2);

int  QarTestConformal(QdObject_var in1_ptr, 
                      QdObject_var in2_ptr);
                                                                                 
int  QarTestConformalForVecProds(QdObject_var in1_ptr, 
                                 QdObject_var in2_ptr);

int QarTestJoined (QdObject_var do1, 
                   QdObject_var do2);

int QarAreUnitsSame(QdObject_var ptr1, 
                    QdObject_var ptr2);

int QarAreFramesSame(QdObject_var ptr1, 
                     QdObject_var ptr2);
                                                                                         
char * QarSIConv_product(QdObject_var in1_var, 
                         QdObject_var in2_var);

char * QarSIConv_inverse(QdObject_var in_var);
                        
char * QarSIConv_power(QdObject_var in_var, double constB);

char * QarFrame_product(QdObject_var in1_var, 
                         QdObject_var in2_var);

char * QarUNITS_product(QdObject_var in1_var, 
                         QdObject_var in2_var);
                       
char * QarUNITS_power(QdObject_var in_var, double constB);
                      
int    QarHasUnits(QdObject_var in_var);



/***********************************************************************/


#endif
