本文整理汇总了C++中Lang::getBhavaName方法的典型用法代码示例。如果您正苦于以下问题:C++ Lang::getBhavaName方法的具体用法?C++ Lang::getBhavaName怎么用?C++ Lang::getBhavaName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lang
的用法示例。
在下文中一共展示了Lang::getBhavaName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeHouse
/*****************************************************
**
** PrintoutHelper --- writeHouse
**
******************************************************/
void PrintoutHelper::writeHouse( Table *table, const int &row, const int &line, const int& house, const bool &vedic )
{
double len;
wxString s;
Lang lang;
Formatter *formatter = Formatter::get();
if ( config->useVedicPlanetNames ) s = lang.getBhavaName( house - 1 );
else s.Printf( wxT( "%02d" ), house );
table->setEntry( row, line, s );
len = h->getHouse( house - 1, vedic );
if ( config->useVedicPositions )
table->setEntry( row + 2, line, writer->getPosFormatted( len, false, DEG_PRECISION_SECOND ), false );
else
{
table->setEntry( row + 2, line, formatter->getLenFormatted( getRasiLen( len ), DEG_PRECISION_MINUTE ));
table->setEntry( row + 3, line, writer->getSignName( getRasi( len )), config->useSignSymbols );
}
if ( vedic )
{
KpData kp = h->getHouseKPLords( house - 1 );
table->setEntry( row + 5, line, writer->getObjectName( kp.lord, TSHORT, true ), config->usePlanetSymbols );
table->setEntry( row + 6, line, writer->getObjectName( kp.sublord, TSHORT, true ), config->usePlanetSymbols );
table->setEntry( row + 7, line, writer->getObjectName( kp.subsublord, TSHORT, true ), config->usePlanetSymbols );
}
}
示例2: writeBhavas
/*****************************************************
**
** TextHelper --- writeBhavas
**
******************************************************/
void TextHelper::writeBhavas()
{
int i;
Lang lang;
wxString s;
double len;
if ( show_header ) writer->writeHeader1( _( "Bhavas" ));
Table table( 3, 13 );
table.setHeader( 0, _( "Bhava" ));
table.setHeader( 1, _( "Cusp" ));
table.setHeader( 2, _( "Sandhi" ));
int line = 1;
for( i = HOUSE1; i <= HOUSE12; i++ )
{
table.setEntry( 0, line, lang.getBhavaName( i ));
table.setEntry( 1, line, writer->getPosFormatted( horoscope->getHouse(i, true, false), false ));
table.setEntry( 2, line, writer->getPosFormatted( horoscope->getHouse(i, true, true), false ));
line++;
}
writer->writeTable( table );
vector<int> obs = chartprops->getPlanetList();
writer->writeHeader2( _( "Planets in Bhavas" ));
Table t2( 4, obs.size() + 1 );
t2.setHeader( 0, _( "Planet" ));
t2.setHeader( 1, _( "Length" ));
t2.setHeader( 2, _( "Bhava" ));
t2.setHeader( 3, _( "Bhava#" ));
line = 1;
for( unsigned int p = 0; p < obs.size(); p++ )
{
i = obs[p];
len = horoscope->getVedicLength( i );
t2.setEntry( 0, line, writer->getObjectName( i, TLARGE, true ));
t2.setEntry( 1, line, writer->getPosFormatted( len, horoscope->isRetrograde( i )));
t2.setEntry( 2, line, lang.getBhavaName( horoscope->getHousePos( i, true )));
t2.setEntry( 3, line, wxString() << horoscope->getHousePos( i, true )+1);
line++;
}
writer->writeTable( t2 );
}
示例3: writeWesternPlanetReport
/*****************************************************
**
** TextHelper --- writeWesternPlanetReport
**
******************************************************/
int TextHelper::writeWesternPlanetReport()
{
wxString s;
double len;
Lang lang;
int ret = 0;
if ( show_header ) writer->writeHeader1( _( "Western Planets" ));
vector<int> obs = chartprops->getWesternPlanetList();
Table table( 3, obs.size() + 13 );
table.setHeader( 0, _( "Planet" ));
table.setHeader( 1, _( "Length" ));
table.setHeader( 2, _( "House" ));
table.col_alignment[0] = Align::Center;
int line = 1;
for ( unsigned int i = 0; i < obs.size(); i++ )
{
len = horoscope->getWesternLength( obs[i] );
if ( len == 0 ) ret++;
table.setEntry( 0, line, writer->getObjectName( obs[i], TLARGE, false ) );
table.setEntry( 1, line, writer->getPosFormatted( len, horoscope->isRetrograde( obs[i] ), DEG_PRECISION_SECOND ) );
s.Printf( wxT( "%02d" ), horoscope->getHousePos( i, false ) + 1 );
table.setEntry( 2, line, s );
line++;
}
for ( int i = 0; i < 12; i++ )
{
if ( config->useVedicPlanetNames ) s = lang.getBhavaName( i );
else s.Printf( wxT( "%02d" ), i+1 );
table.setEntry( 0, line, s );
table.setEntry( 1, line, writer->getPosFormatted( horoscope->getHouse( i, false ), false ) );
line++;
}
writer->writeTable( table );
return ret;
}
示例4: writeKp
/*****************************************************
**
** TextHelper --- writeKp
**
******************************************************/
int TextHelper::writeKp( const int &dasaindex )
{
wxString s;
Lang lang;
int p, ret = 0;
double len, hlen;
DasaExpert *expert = DasaExpertFactory::get()->getDasaExpert( dasaindex );
KpData kp;
if ( ! expert->hasKpFeatures() ) // Not supported by all (e.g. Jaimini)
{
writer->writeLine( _( "Not supported" ) );
return 0;
}
horoscope->updateKP( dasaindex );
if ( show_header )
{
writer->writeHeader1( _( "Krishnamurti Paddhati" ));
s.Printf( wxT( "%s: %s" ), _( "Dasa"), expert->getName());
writer->writeParagraph( s );
}
int kpstyle = chartprops->getVedicObjectStyle();
if ( chartprops->getVedicObjectStyle() & OBJECTS_INCLUDE_ASCENDANT ) kpstyle -= OBJECTS_INCLUDE_ASCENDANT;
if ( chartprops->getVedicObjectStyle() & OBJECTS_INCLUDE_MERIDIAN ) kpstyle -= OBJECTS_INCLUDE_MERIDIAN;
vector<int> obs = PlanetList().getVedicObjectList( kpstyle );
Table table( 7, obs.size()+13 );
table.setHeader( 0, _( "Planet" ));
table.setHeader( 1, _( "Length" ));
table.setHeader( 2, _( "Sign Lord" ));
table.setHeader( 3, _( "Bhava" ));
table.setHeader( 4, _( "KP Lord" ));
table.setHeader( 5, _( "Sublord" ));
table.setHeader( 6, _( "Subsublord" ));
for( int i = 0; i < 7; i++ ) table.col_alignment[i] = Align::Center;
int line = 1;
for ( unsigned int i1 = 0; i1 < obs.size(); i1++ )
{
p = obs[i1];
len = horoscope->getVedicLength( p );
if ( len == 0 ) ret++;
table.setEntry( 0, line, writer->getObjectName( p, TLARGE, true ) );
table.setEntry( 1, line, writer->getPosFormatted( len, horoscope->isRetrograde( p )));
table.setEntry( 2, line, writer->getObjectName( getLord( getRasi( len )), TLARGE, true ) );
s.Printf( wxT( "%02d" ), horoscope->getHousePos( p, true ) + 1 );
table.setEntry( 3, line, s );
kp = horoscope->getKPLords( p );
if ( expert->isRasiDasaExpert() )
{
table.setEntry( 4, line, writer->getSignName( kp.lord, TLARGE ) );
table.setEntry( 5, line, writer->getSignName( kp.sublord, TLARGE ) );
table.setEntry( 6, line, writer->getSignName( kp.subsublord, TLARGE ) );
}
else
{
table.setEntry( 4, line, writer->getObjectName( kp.lord, TLARGE, true ) );
table.setEntry( 5, line, writer->getObjectName( kp.sublord, TLARGE, true ) );
table.setEntry( 6, line, writer->getObjectName( kp.subsublord, TLARGE, true ) );
}
line++;
}
for ( p = HOUSE1; p <= HOUSE12; p++ )
{
hlen = horoscope->getHouse( p, true, false );
table.setEntry( 0, line, lang.getBhavaName( p ));
table.setEntry( 1, line, writer->getPosFormatted( hlen, false ) );
table.setEntry( 2, line, writer->getObjectName( getLord(getRasi( hlen )), TLARGE, true ) );
kp = horoscope->getHouseKPLords( p );
if ( expert->isRasiDasaExpert() )
{
table.setEntry( 4, line, writer->getSignName( kp.lord, TLARGE ) );
table.setEntry( 5, line, writer->getSignName( kp.sublord, TLARGE ) );
table.setEntry( 6, line, writer->getSignName( kp.subsublord, TLARGE ) );
}
else
{
table.setEntry( 4, line, writer->getObjectName( kp.lord, TLARGE, true ) );
table.setEntry( 5, line, writer->getObjectName( kp.sublord, TLARGE, true ) );
table.setEntry( 6, line, writer->getObjectName( kp.subsublord, TLARGE, true ) );
}
line++;
}
writer->writeTable( table );
return ret;
}
示例5: writeVedicPlanets
//.........这里部分代码省略.........
table.setHeader( i++, _( "KP Lord" ));
table.setHeader( i++, _( "Sublord" ));
table.setHeader( i++, _( "Subsublord" ));
}
if ( opt_shast ) table.setHeader( i++, _( "Shastiamsa" ));
if ( opt_dasa ) table.setHeader( i++, _( "Dasa Varga" ));
if ( opt_bha ) table.setHeader( i++, _( "Bhava" ));
if ( opt_kara ) table.setHeader( i++, _( "Karaka" ));
if ( opt_ashtaka ) table.setHeader( i++, _( "AV" ));
for ( i = 0; i < obs.size(); i++ )
{
pindex = obs[i];
if ( pindex >= HOUSE_QUALIFIER )
{
pos.length = horoscope->getHouse( pindex - HOUSE_QUALIFIER, true, false );
pos.latitude = 0;
pos.retro = false;
}
else
{
pos = horoscope->getObjectPosition( pindex, true );
// pos.length is 0 for unclaculated planets because Ayanamsa isn't subtracted in that case
if ( pos.length == 0 && pindex != OARIES ) ret++;
}
planet = 0;
col = 2;
assert( (int)table.nb_rows >= rowindex );
table.setEntry( 0, rowindex,
( pindex <= LAST_ARABIC_OBJECT ? writer->getObjectName( pindex, TLARGE, true ) : lang.getBhavaName( pindex - HOUSE_QUALIFIER )));
if ( pindex <= OSATURN ) planet = horoscope->getPlanet( pindex );
table.setEntry( 1, rowindex, writer->getPosFormatted( pos.length, pos.retro ));
// Declination
if ( opt_declinations )
table.setEntry( col++, rowindex, f->getLatitudeFormatted( pos.latitude, DEG_PRECISION_SECOND ));
// Lord
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 )
{