Ejemplo n.º 1
0
bool wxRegConfig::RenameGroup(const wxString& oldName, const wxString& newName)
{
    // check that the old group exists...
    if ( !HasGroup(oldName) )
        return false;

    // and that the new one doesn't
    if ( HasGroup(newName) )
        return false;

    return wxRegKey(m_keyLocal, oldName).Rename(newName);
}
Ejemplo n.º 2
0
OlcGroup* OlcManager::GetGroup(OLCGROUP group)
{
    if (!HasGroup(group))
        {
            return NULL;
        }

    return _olcs[(int)group];
}
Ejemplo n.º 3
0
BOOL OlcManager::AddGroup(OLCGROUP g, OlcGroup* group)
{
    if (HasGroup(g))
        {
            return false;
        }

    _olcs[(int)g] = group;
    return true;
}
Ejemplo n.º 4
0
void GeneratorTag :: Generate( Model * model ) {

	std::ostream & os = FileManager::Instance().GetStream( mOutFile );
	int nrows = mCount < 0 ? GetSize() : mCount;
	bool debug = false; // model->Debug() || Debug();

	if ( debug ) {
		std::cerr << "----- begin " << Name() << "\n";
	}

	if ( mFields.Size() ) {
		Row r;
		for ( unsigned int i = 0; i < mFields.Size(); i++ ) {
			r.AppendValue( mFields.At( i ) );
		}
		if ( debug ) {
			DebugRow( r, std::cerr );
		}
		os << r.AsCSV() << "\n";
	}

	while( nrows-- ) {
		Row r = Get();
		if ( debug ) {
			DebugRow( r, std::cerr );
		}
		if ( ! HasGroup() ) {
			os << r.AsCSV() << "\n";
		}
		AddRow( r );
	}

	if ( HasGroup() ) {
		DoGroup();
		for ( int i = 0; i < Size(); i++ ) {
			os << RowAt(i).AsCSV() << "\n";
		}
	}

	if ( debug ) {
		std::cerr << "----- end   " << Name() << "\n";
	}
}