本文整理汇总了C++中Lang::getShastiamsaName方法的典型用法代码示例。如果您正苦于以下问题:C++ Lang::getShastiamsaName方法的具体用法?C++ Lang::getShastiamsaName怎么用?C++ Lang::getShastiamsaName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lang
的用法示例。
在下文中一共展示了Lang::getShastiamsaName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeShastiamsaLords
/*****************************************************
**
** GenericTableWriter --- writeShastiamsaLords
**
******************************************************/
void GenericTableWriter::writeShastiamsaLords( const uint &i0, const TcColumnSet &set )
{
int shast;
Lang lang;
ObjectPosition pos;
const static bool k_shastiamsa_benefic[60] = {
false, false, true, true, true, true, false, false, false, false,
false, false, true, true, false, false, true, true, true, true,
true, true, true, true, true, true, true, true, true, false,
false, false, false, false, false, false, true, true, true, false,
false, false, false, false, true, true, true, false, true, true,
false, false, true, true, false, true, true, true, false, true,
};
// Dignities
table->setHeader( i0, _( "D-60 Lords" ));
for ( uint p = 0; p < obs.size(); p++ )
{
pos = getObjectPosition( obs[p], set );
shast = (int)( a_red( pos.longitude, 30 ) * 2 );
if ( isEvenRasi( pos.longitude )) shast = 59 - shast;
assert( shast >= 0 && shast < 60 );
table->setEntry( i0, p + 1, wxString::Format( wxT( "%s (%c)" ), lang.getShastiamsaName( shast ).c_str(),
( k_shastiamsa_benefic[(int)shast] ? 'B' : 'M' )));
}
}
示例2: writeVedicPlanets
//.........这里部分代码省略.........
if ( opt_lord )
table.setEntry( col++, rowindex, writer->getObjectName( getLord( getRasi( pos.length )), TLARGE, true ));
// Dignity
if ( opt_dig )
{
if ( pindex >= OSUN && pindex <= OSATURN && obs[i] < MAX_EPHEM_OBJECTS )
table.setEntry( col, rowindex, lang.getDignityName( horoscope->getVargaData( pindex, VARGA_RASI )->getDignity(), TLARGE ));
col++;
}
// Navamsa
if ( opt_nav )
table.setEntry( col++, rowindex, writer->getSignName( getRasi( pos.length * 9 ), config->signPrecision ));
// Nakshatra
if ( opt_nak )
table.setEntry( col++, rowindex,
lang.getNakshatraName( getNakshatra( pos.length, nakshatramode ), nakshatramode, TMEDIUM ));
// Pada
if ( opt_pada )
{
s.Printf( wxT( "%d" ), (int)(getNakshatraLength( pos.length, nakshatramode ) / 3.3333333333 ) + 1 );
table.setEntry( col++, rowindex, s );
}
// Krishnamurti
if ( opt_kp )
{
KpData kp;
if ( pindex <= LAST_ARABIC_OBJECT )
{
kp = horoscope->getKPLords( obs[i] );
}
else
{
kp = horoscope->getHouseKPLords( pindex - HOUSE_QUALIFIER );
}
table.setEntry( col++, rowindex, writer->getObjectName( kp.lord, TLARGE, true ));
table.setEntry( col++, rowindex, writer->getObjectName( kp.sublord, TLARGE, true ));
table.setEntry( col++, rowindex, writer->getObjectName( kp.subsublord, TLARGE, true ));
}
// Shastiamsa
if ( opt_shast )
{
shast = (int)( a_red( pos.length, 30 ) * 2 );
if ( isEvenRasi( pos.length )) shast = 59 - shast;
assert( shast >= 0 && shast < 60 );
s.Printf( wxT( "%s (%c)" ), (const wxChar*)lang.getShastiamsaName( shast),
( k_shastiamsa_benefic[(int)shast] ? 'B' : 'M' ));
table.setEntry( col, rowindex, s );
col++;
}
// Dasavarga Dignity
if ( opt_dasa )
{
if ( pindex <= OSATURN && obs[i] < MAX_EPHEM_OBJECTS )
{
VargaExpert expert;
table.setEntry( col, rowindex, lang.getVimsopakaDignityName( 2, planet->getVimsopakaBalaGoodVargas( 2 )) );
}
col++;
}
// Bhava
if ( opt_bha && obs[i] <= MAX_EPHEM_OBJECTS )
{
s.Printf( wxT( "%d" ), red12( bchart.getRasi( pindex ) - bchart.getRasi( OASCENDANT )) + 1 );
table.setEntry( col++, rowindex, s );
}
// Karaka
if ( opt_kara )
{
if ( pindex <= OSATURN ) p = pindex;
else if ( pindex == OMEANNODE || pindex == OTRUENODE ) p = 7;
else p = -1;
if ( p >= 0 ) table.setEntry( col, rowindex, lang.getKarakaName( expert.getCharaKarakaProperty( p )) );
col++;
}
// Ashtaka Varga
if ( opt_ashtaka )
{
if ((( pindex >= OSUN && pindex <= OSATURN ) || pindex == OASCENDANT ) && obs[i] <= MAX_EPHEM_OBJECTS )
{
s.Printf( wxT( "%d" ), aexpert.getItem( REKHA, pindex, getRasi( pos.length )));
table.setEntry( col++, rowindex, s );
}
col++;
}
rowindex++;
}
writer->writeTable( table );
return ret;
}