Пример #1
0
/*****************************************************
**
**   GenericNakshatraDasaExpert   ---   getFirstLevel
**
******************************************************/
vector<Dasa*> GenericNakshatraDasaExpert::getFirstLevel()
{
	vector<Dasa*> ret, tret;
	double nportion;
	int total_length = 0;
	Nakshatra nak;

	nportion = getPortion( nak );
	int pindex = getDasaIndex4Nakshatra( nak );
	int pl = getDasaLordByIndex( pindex );

	double start_jd = horoscope->getJD() - nportion * getDasaDuration( pindex ) * getYearLength( true );
	double end_jd = start_jd + getParamayus() * getYearLength( true );

	while ( total_length < 100 )
	{
		Dasa d( dasaId, pl, start_jd, end_jd, (Dasa*)NULL );
		d.setLevel( -1 );
		tret = getNextLevel( &d );
		for ( unsigned j = 0; j < tret.size(); j++ )
		{
			tret[j]->setParent( (Dasa*)NULL );
			ret.push_back( tret[j] );
		}
		tret.clear();
		total_length += getParamayus();
		start_jd = end_jd;
		end_jd += getParamayus() * getYearLength( true );
	}
	return ret;
}
Пример #2
0
                void NLocalisationRequest::toStruct(_NLocalisationRequest & input)
                {
                    memset(&input, 0, sizeof(_NLocalisationRequest));

                    getHead().toStruct(input.Head);
                    getPortion().toStruct(input.Portion);

                    input.Head.Control.Size = sizeof(_NLocalisationRequest);
                }