本文整理汇总了C++中registerObject函数的典型用法代码示例。如果您正苦于以下问题:C++ registerObject函数的具体用法?C++ registerObject怎么用?C++ registerObject使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了registerObject函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: registerObject
AIDA::IHistogram3D*
AIDA_ROOT::AIDA_HistogramFactory::createHistogram3D( const std::string& name, const std::string& title, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, int nBinsZ, double lowerEdgeZ, double upperEdgeZ, const std::string& options )
{
#ifdef AIDA_ROOT_HISTOGRAM_NO_EXCEPTIONS_TO_USER
try{
#endif
AIDA::Dev::IDevHistogram3D* p = m_factory.createHistogram3D( title, nBinsX, lowerEdgeX, upperEdgeX, nBinsY, lowerEdgeY, upperEdgeY, nBinsZ, lowerEdgeZ, upperEdgeZ, options );
return registerObject( p, name );
#ifdef AIDA_ROOT_HISTOGRAM_NO_EXCEPTIONS_TO_USER
}
catch( std::exception& e ) {
HISTOGRAM_REPORT_ERROR( e.what() );
return 0;
}
#endif
}
开发者ID:apfeiffer1,项目名称:iAIDA,代码行数:16,代码来源:AIDA_HistogramFactory.cpp
示例2: QObject
Server::Server ()
: QObject ()
{
qInstallMsgHandler (Write);
const auto pid = QCoreApplication::applicationPid ();
RegisterTypes ();
auto sb = QDBusConnection::sessionBus ();
const auto& serviceName = QString ("org.LeechCraft.Wrapper_%1").arg (pid);
qDebug () << "registering service..." << sb.registerService (serviceName);
qDebug () << "registering primary object..." << sb.registerObject ("/org/LeechCraft/Control",
this, QDBusConnection::ExportAllContents);
QLocalSocket socket;
socket.connectToServer (QString ("lc_waiter_%1").arg (pid));
qDebug () << "notifying master..." << socket.waitForConnected ();
}
开发者ID:ROOAARR,项目名称:leechcraft,代码行数:18,代码来源:server.cpp
示例3: IOobject
Foam::regIOobject::regIOobject
(
const IOobject& io,
const regIOobject& rio
)
:
IOobject(io),
registered_(false),
ownedByRegistry_(false),
watchIndex_(-1),
eventNo_(db().getEvent()),
isPtr_(NULL)
{
if (registerObject())
{
checkIn();
}
}
开发者ID:Kiiree,项目名称:OpenFOAM-dev,代码行数:18,代码来源:regIOobject.C
示例4: findObject
AudioOutputPort *AudioOutputPortCache::getAudioOutputPort(const char* portName, const char* connection)
{
int key = std::hash<std::string>()(portName);
// see if port already exists in map
AudioOutputPort *port = findObject(key);
if(!port) {
// create system port
jack_port_t *jackPort = AudioEngine::instance().registerAudioOutputPort(portName);
if(!jackPort) {
throw std::logic_error(std::string("Failed to register port ") + portName);
}
port = new AudioOutputPort(jackPort);
registerObject(key, port);
}
if(connection) {
port->systemConnect(connection);
}
return port;
}
开发者ID:bipscript,项目名称:bipscript,代码行数:19,代码来源:audioport.cpp
示例5: checkOut
// Assign to IOobject
void Foam::regIOobject::operator=(const IOobject& io)
{
if (isPtr_)
{
delete isPtr_;
isPtr_ = NULL;
}
// Check out of objectRegistry
checkOut();
IOobject::operator=(io);
if (registerObject())
{
// Re-register object with objectRegistry
checkIn();
}
}
开发者ID:Kiiree,项目名称:OpenFOAM-dev,代码行数:20,代码来源:regIOobject.C
示例6: AkLoggerLog
void AkVCam::PluginInterface::destroyDevice(const std::string &deviceId)
{
AkLoggerLog("AkVCam::PluginInterface::destroyDevice");
for (auto it = this->m_devices.begin(); it != this->m_devices.end(); it++) {
auto device = *it;
std::string curDeviceId;
device->properties().getProperty(kCMIODevicePropertyDeviceUID,
&curDeviceId);
if (curDeviceId == deviceId) {
device->stopStreams();
device->registerObject(false);
device->registerStreams(false);
this->m_devices.erase(it);
break;
}
}
}
开发者ID:webcamoid,项目名称:webcamoid,代码行数:21,代码来源:plugininterface.cpp
示例7: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setOrganizationName("kylin");
a.setApplicationName("Kylin Weather (indication-china-weather)");
a.setApplicationVersion("3.0.1");
a.setQuitOnLastWindowClosed(false);//Avoid that after hiding mainwindow, close the sub window would cause the program exit
QString locale = QLocale::system().name();
QTranslator translator;
if(locale == "zh_CN") {
if(!translator.load("indicator-china-weather_" + locale + ".qm",
":/qm/translation/"))
qDebug() << "Load translation file:"<< "indicator-china-weather_" + locale + ".qm" << " failed!";
else
a.installTranslator(&translator);
}
// QTranslator qtTranslator;
// qtTranslator.load("qt_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
// a.installTranslator(&qtTranslator);
MainWindow w;
DbusAdaptor adaptor(&w);
Q_UNUSED(adaptor);
auto connection = QDBusConnection::sessionBus();
if (!connection.registerService("com.kylin.weather") || !connection.registerObject("/com/kylin/weather", &w/*, QDBusConnection::ExportAllSlots | QDBusConnection::ExportAllSignals*/)) {
//qCritical() << "QDbus register service failed reason:" << connection.lastError();
QDBusInterface iface("com.kylin.weather",
"/com/kylin/weather",
"com.kylin.weather",
connection);
iface.call("showMainWindow");
return 0;
}//QDBusConnection::sessionBus().unregisterService("com.kylin.weather");
//w.show();
return a.exec();
}
开发者ID:UbuntuKylin,项目名称:indicator-china-weather,代码行数:40,代码来源:main.cpp
示例8: LBASSERT
bool MasterConfig::init()
{
LBASSERT( !_objects );
_objects = new ObjectMap( *this, *getApplication( ));
co::Object* initData = getInitData();
if( initData )
LBCHECK( _objects->register_( initData, OBJECTTYPE_INITDATA ));
_objects->setInitData( initData );
LBCHECK( registerObject( _objects ));
if( !eq::Config::init( _objects->getID( )))
{
LBWARN << "Error during initialization" << std::endl;
exit();
return false;
}
_redraw = true;
return true;
}
开发者ID:Angels-group,项目名称:Equalizer,代码行数:22,代码来源:masterConfig.cpp
示例9: mainMenu
int mainMenu(void)
{
int option = -1;
//system("clear");
printf("Welcome\n");
printf("1. Register\n");
printf("2. Unregister\n");
printf("3. Query\n");
printf("4. Exit\n");
printf("\nOption: ");
scanf("%d", &option);
switch (option)
{
case 1:
registerObject();
break;
case 2:
unregisterObject();
break;
case 3:
query();
break;
case 4:
printf("All done!\n");
break;
default:
// no point printing message; system("clear") will erase it.
//printf("Enter a valid Option, 1 - 4");
// this will flush the input stream
while (getchar() != '\n');
break;
}
return option;
}
开发者ID:DANGBI,项目名称:labs,代码行数:39,代码来源:lab53_menu.c
示例10: main
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
auto props = new PropertiesServer(&a);
new PropertiesAdaptor(props);
new AccountsUserAdaptor(props);
auto accounts = new AccountsServer(props, &a);
new AccountsAdaptor(accounts);
new SecurityPrivacyAdaptor(accounts);
new LocationAdaptor(accounts);
new AccountsPrivateAdaptor(accounts);
// We use the session bus for testing. The real plugin uses the system bus
auto connection = QDBusConnection::sessionBus();
if (!connection.registerObject("/org/freedesktop/Accounts", accounts))
return 1;
if (!connection.registerService("org.freedesktop.Accounts"))
return 1;
return a.exec();
}
开发者ID:jonjahren,项目名称:unity8,代码行数:22,代码来源:server.cpp
示例11: m_engine
ScriptEngine::ScriptEngine()
: m_engine(asCreateScriptEngine())
{
if (!m_engine)
return;
// Set the message callback to receive information on errors in human readable form.
int r = m_engine->SetMessageCallback(asFUNCTION(MessageCallback), &m_errorString, asCALL_CDECL); assert(r >= 0);
RegisterStdString(m_engine);
// RegisterStdStringUtils(engine);
// The scripts can directly print text
r = m_engine->RegisterGlobalFunction("void print(const string &in message)", asMETHOD(ScriptEngine, print), asCALL_THISCALL_ASGLOBAL, this); assert(r >= 0);
RegisterScriptMath(m_engine);
aatc::RegisterAllContainers(m_engine);
registerObject(m_engine);
registerAllTypes(m_engine);
generateReference();
}
开发者ID:cguebert,项目名称:Panda,代码行数:23,代码来源:ScriptEngine.cpp
示例12: debugsupport_registerMonitorCommand
void debugsupport_registerMonitorCommand(ObjectDesc * self, ObjectDesc * name, ObjectDesc * cmd)
{
#if defined(MONITOR)
#if defined(JAVA_MONITOR_COMMANDS)
char value[128];
Proxy *proxy;
u4_t quota = 1000;
DomainDesc *domain = CALLERDOMAIN;
if (name == 0 || cmd == 0)
return;
stringToChar(name, value, sizeof(value));
DISABLE_IRQ;
#ifdef COPY_TO_DOMAINZERO
proxy = cmd;
#else
proxy = copy_reference(domain, curdom(), cmd, "a);
#endif
RESTORE_IRQ;
register_command(value, registerObject(curdom(), proxy), domain);
#endif
#endif /* MONITOR */
}
开发者ID:BackupTheBerlios,项目名称:jem-svn,代码行数:24,代码来源:zero_DebugSupport.c
示例13: setParent
BattleScripting::BattleScripting(QScriptEngine *engine, BaseBattleWindowInterface *_interface)
{
myinterface = _interface;
myengine = engine;
myengine->setParent(this);
setParent(_interface);
registerObject(ProxyDataContainer);
registerObject(TeamProxy);
registerObject(PokeProxy);
registerObject(MoveProxy);
registerObject(AuxPokeDataProxy);
registerObject(FieldProxy);
qScriptRegisterMetaType<BattleChoice>(engine, &toBattleChoice, &fromBattleChoice);
advbattledata_proxy *data = _interface->getBattleData();
ProxyDataContainer *pdata = data->exposedData();
int me = data->isPlayer(1) ? 1 : 0;
int opp = !me;
QScriptValue battle = myengine->newQObject(_interface);
myengine->globalObject().setProperty("battle", battle);
battle.setProperty("data", myengine->newQObject(dynamic_cast<QObject*>(pdata)));
battle.setProperty("me", QScriptValue(me));
battle.setProperty("opp", QScriptValue(opp));
battle.setProperty("id", _interface->battleId());
/* Removes clientscripting' print function and add ours. Client scripting's print function
can still be accessed with sys.print() */
QScriptValue printfun = myengine->newFunction(nativePrint);
printfun.setData(myengine->newQObject(this));
myengine->globalObject().setProperty("print", myengine->nullValue());
myengine->globalObject().setProperty("print", printfun);
_interface->addOutput(this);
}
开发者ID:Angryn00b,项目名称:pokemon-online,代码行数:36,代码来源:battlescripting.cpp
示例14: registerObject
InputObject::InputObject()
{
registerObject(this) ;
}
开发者ID:BackupTheBerlios,项目名称:projet-univers-svn,代码行数:4,代码来源:input_object.cpp
示例15: parent
QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass, const QString& par, const QString& layout )
{
QString parent( par );
if ( parent == "this" && isMainWindow ) {
if ( !createdCentralWidget )
out << indent << "setCentralWidget( new QWidget( this, \"qt_central_widget\" ) );" << endl;
createdCentralWidget = TRUE;
parent = "centralWidget()";
}
QDomElement n;
QString objClass, objName;
int numItems = 0;
int numColumns = 0;
int numRows = 0;
if ( layouts.contains( e.tagName() ) )
return createLayoutImpl( e, parentClass, parent, layout );
objClass = getClassName( e );
if ( objClass.isEmpty() )
return objName;
objName = getObjectName( e );
QString definedName = objName;
bool isTmpObject = objName.isEmpty() || objClass == "QLayoutWidget";
if ( isTmpObject ) {
if ( objClass[0] == 'Q' )
objName = objClass.mid(1);
else
objName = objClass.lower();
objName.prepend( "private" );
}
bool isLine = objClass == "Line";
if ( isLine )
objClass = "QFrame";
out << endl;
if ( objClass == "QLayoutWidget" ) {
if ( layout.isEmpty() ) {
// register the object and unify its name
objName = registerObject( objName );
out << " QWidget* " << objName << " = new QWidget( " << parent << ", \"" << definedName << "\" );" << endl;
} else {
// the layout widget is not necessary, hide it by creating its child in the parent
QString result;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if (tags.contains( n.tagName() ) )
result = createObjectImpl( n, parentClass, parent, layout );
}
return result;
}
} else if ( objClass != "QToolBar" && objClass != "QMenuBar" ) {
// register the object and unify its name
objName = registerObject( objName );
out << " ";
if ( isTmpObject )
out << objClass << "* ";
out << objName << " = new " << createObjectInstance( objClass, parent, objName ) << ";" << endl;
}
if ( objClass == "QAxWidget" ) {
QString controlId;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" && n.attribute( "name" ) == "control" ) {
controlId = n.firstChild().toElement().text();
}
}
out << " ";
out << objName << "->setControl(\"" << controlId << "\");" << endl;
}
lastItem = "0";
// set the properties and insert items
bool hadFrameShadow = FALSE;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
bool stdset = stdsetdef;
if ( n.hasAttribute( "stdset" ) )
stdset = toBool( n.attribute( "stdset" ) );
QString prop = n.attribute( "name" );
if ( prop == "database" )
continue;
QString value = setObjectProperty( objClass, objName, prop, n.firstChild().toElement(), stdset );
if ( value.isEmpty() )
continue;
if ( prop == "name" )
continue;
if ( isLine && prop == "frameShadow" )
hadFrameShadow = TRUE;
if ( prop == "buddy" && value.startsWith("\"") && value.endsWith("\"") ) {
buddies << Buddy( objName, value.mid(1, value.length() - 2 ) );
continue;
}
if ( isLine && prop == "orientation" ) {
prop = "frameShape";
if ( value.right(10) == "Horizontal" )
value = "QFrame::HLine";
else
value = "QFrame::VLine";
//.........这里部分代码省略.........
开发者ID:AliYousuf,项目名称:univ-aca-mips,代码行数:101,代码来源:object.cpp
示例16: while
/*! Attention: this function has to be in sync with
Resource::saveProperty() and DomTool::elementToVariant. If you
change one, change all.
*/
QString Uic::setObjectProperty( const QString& objClass, const QString& obj, const QString &prop, const QDomElement &e, bool stdset )
{
QString v;
if ( e.tagName() == "rect" ) {
QDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0, w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
x = n3.firstChild().toText().data().toInt();
else if ( n3.tagName() == "y" )
y = n3.firstChild().toText().data().toInt();
else if ( n3.tagName() == "width" )
w = n3.firstChild().toText().data().toInt();
else if ( n3.tagName() == "height" )
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
v = "QRect( %1, %2, %3, %4 )";
v = v.arg(x).arg(y).arg(w).arg(h);
} else if ( e.tagName() == "point" ) {
QDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
x = n3.firstChild().toText().data().toInt();
else if ( n3.tagName() == "y" )
y = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
v = "QPoint( %1, %2 )";
v = v.arg(x).arg(y);
} else if ( e.tagName() == "size" ) {
QDomElement n3 = e.firstChild().toElement();
int w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
w = n3.firstChild().toText().data().toInt();
else if ( n3.tagName() == "height" )
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
v = "QSize( %1, %2 )";
v = v.arg(w).arg(h);
} else if ( e.tagName() == "color" ) {
QDomElement n3 = e.firstChild().toElement();
int r = 0, g = 0, b = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "red" )
r = n3.firstChild().toText().data().toInt();
else if ( n3.tagName() == "green" )
g = n3.firstChild().toText().data().toInt();
else if ( n3.tagName() == "blue" )
b = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
v = "QColor( %1, %2, %3 )";
v = v.arg(r).arg(g).arg(b);
} else if ( e.tagName() == "font" ) {
QDomElement n3 = e.firstChild().toElement();
QString attrname = e.parentNode().toElement().attribute( "name", "font" );
QString fontname;
if ( !obj.isEmpty() ) {
fontname = registerObject( obj + "_" + attrname );
out << indent << "QFont " << fontname << "( " << obj << "->font() );" << endl;
} else {
fontname = registerObject( "f" );
out << indent << "QFont " << fontname << "( font() );" << endl;
}
while ( !n3.isNull() ) {
if ( n3.tagName() == "family" )
out << indent << fontname << ".setFamily( \"" << n3.firstChild().toText().data() << "\" );" << endl;
else if ( n3.tagName() == "pointsize" )
out << indent << fontname << ".setPointSize( " << n3.firstChild().toText().data() << " );" << endl;
else if ( n3.tagName() == "bold" )
out << indent << fontname << ".setBold( " << mkBool( n3.firstChild().toText().data() ) << " );" << endl;
else if ( n3.tagName() == "italic" )
out << indent << fontname << ".setItalic( " << mkBool( n3.firstChild().toText().data() ) << " );" << endl;
else if ( n3.tagName() == "underline" )
out << indent << fontname << ".setUnderline( " << mkBool( n3.firstChild().toText().data() ) << " );" << endl;
else if ( n3.tagName() == "strikeout" )
out << indent << fontname << ".setStrikeOut( " << mkBool( n3.firstChild().toText().data() ) << " );" << endl;
n3 = n3.nextSibling().toElement();
}
if ( prop == "font" ) {
if ( !obj.isEmpty() )
out << indent << obj << "->setFont( " << fontname << " ); " << endl;
else
out << indent << "setFont( " << fontname << " ); " << endl;
} else {
v = fontname;
}
} else if ( e.tagName() == "string" ) {
QString txt = e.firstChild().toText().data();
QString com = getComment( e.parentNode() );
//.........这里部分代码省略.........
开发者ID:AliYousuf,项目名称:univ-aca-mips,代码行数:101,代码来源:object.cpp
示例17: registerObject
FunctionFactory::FunctionFactory() : CloningFactory<Function::Element*>("Function::Element") {
//OPERATORS:
int p = 100;
//First order: not, negate:
registerObject("!", new Function::Element("!", "Logical NOT",
Function::Element::OPERATOR, &(fl::Op::logicalNot), p, 1)); //logical not
registerObject("~", new Function::Element("~", "Negation",
Function::Element::OPERATOR, &(fl::Op::negate), p, 1)); // ~ negates a number
p -= 10;
//Second order: power
registerObject("^", new Function::Element("^", "Power",
Function::Element::OPERATOR, &(std::pow), p, 1));
p -= 10;
//Third order: multiplication, division, modulo
registerObject("*", new Function::Element("*", "Multiplication",
Function::Element::OPERATOR, &(fl::Op::multiply), p));
registerObject("/", new Function::Element("/", "Division",
Function::Element::OPERATOR, &(fl::Op::divide), p));
registerObject("%", new Function::Element("%", "Modulo",
Function::Element::OPERATOR, &(fl::Op::modulo), p));
p -= 10;
//Fourth order: addition, subtraction
registerObject("+", new Function::Element("+", "Addition",
Function::Element::OPERATOR, &(fl::Op::add), p));
registerObject("-", new Function::Element("-", "Subtraction",
Function::Element::OPERATOR, &(fl::Op::subtract), p));
//Fifth order: logical and, logical or
p -= 10; //Logical AND
registerObject(fl::Rule::andKeyword(), new Function::Element(fl::Rule::andKeyword(), "Logical AND",
Function::Element::OPERATOR, &(fl::Op::logicalAnd), p));
p -= 10; //Logical OR
registerObject(fl::Rule::orKeyword(), new Function::Element(fl::Rule::orKeyword(), "Logical OR",
Function::Element::OPERATOR, &(fl::Op::logicalOr), p));
//FUNCTIONS
registerObject("gt", new Function::Element("gt", "Greater than (>)",
Function::Element::FUNCTION, &(fl::Op::gt)));
registerObject("ge", new Function::Element("ge", "Greater than or equal to (>=)",
Function::Element::FUNCTION, &(fl::Op::ge)));
registerObject("eq", new Function::Element("eq", "Equal to (==)",
Function::Element::FUNCTION, &(fl::Op::eq)));
registerObject("neq", new Function::Element("neq", "Not equal to (!=)",
Function::Element::FUNCTION, &(fl::Op::neq)));
registerObject("le", new Function::Element("le", "Less than or equal to (<=)",
Function::Element::FUNCTION, &(fl::Op::le)));
registerObject("lt", new Function::Element("lt", "Less than (<)",
Function::Element::FUNCTION, &(fl::Op::lt)));
registerObject("acos", new Function::Element("acos", "Inverse cosine",
Function::Element::FUNCTION, &(std::acos)));
registerObject("asin", new Function::Element("asin", "Inverse sine",
Function::Element::FUNCTION, &(std::asin)));
registerObject("atan", new Function::Element("atan", "Inverse tangent",
Function::Element::FUNCTION, &(std::atan)));
registerObject("ceil", new Function::Element("ceil", "Ceiling",
Function::Element::FUNCTION, &(std::ceil)));
registerObject("cos", new Function::Element("cos", "Cosine",
Function::Element::FUNCTION, &(std::cos)));
registerObject("cosh", new Function::Element("cosh", "Hyperbolic cosine",
Function::Element::FUNCTION, &(std::cosh)));
registerObject("exp", new Function::Element("exp", "Exponential",
Function::Element::FUNCTION, &(std::exp)));
registerObject("fabs", new Function::Element("fabs", "Absolute",
Function::Element::FUNCTION, &(std::fabs)));
registerObject("floor", new Function::Element("floor", "Floor",
Function::Element::FUNCTION, &(std::floor)));
registerObject("log", new Function::Element("log", "Natural logarithm",
Function::Element::FUNCTION, &(std::log)));
registerObject("log10", new Function::Element("log10", "Common logarithm",
Function::Element::FUNCTION, &(std::log10)));
registerObject("round", new Function::Element("round", "Round",
Function::Element::FUNCTION, &(fl::Op::round)));
registerObject("sin", new Function::Element("sin", "Sine",
Function::Element::FUNCTION, &(std::sin)));
registerObject("sinh", new Function::Element("sinh", "Hyperbolic sine",
Function::Element::FUNCTION, &(std::sinh)));
registerObject("sqrt", new Function::Element("sqrt", "Square root",
Function::Element::FUNCTION, &(std::sqrt)));
registerObject("tan", new Function::Element("tan", "Tangent",
Function::Element::FUNCTION, &(std::tan)));
registerObject("tanh", new Function::Element("tanh", "Hyperbolic tangent",
Function::Element::FUNCTION, &(std::tanh)));
#if defined(FL_UNIX) && !defined(FL_USE_FLOAT)
//found in Unix when using double precision. not found in Windows.
registerObject("log1p", new Function::Element("log1p", "Natural logarithm plus one",
Function::Element::FUNCTION, &(log1p)));
registerObject("acosh", new Function::Element("acosh", "Inverse hyperbolic cosine",
Function::Element::FUNCTION, &(acosh)));
registerObject("asinh", new Function::Element("asinh", "Inverse hyperbolic sine",
Function::Element::FUNCTION, &(asinh)));
registerObject("atanh", new Function::Element("atanh", "Inverse hyperbolic tangent",
Function::Element::FUNCTION, &(atanh)));
//.........这里部分代码省略.........
开发者ID:invalid404,项目名称:FuzzyFall,代码行数:101,代码来源:FunctionFactory.cpp
示例18: registerKernel
void
MooseTestApp::registerObjects(Factory & factory)
{
// Kernels
registerKernel(ConservativeAdvection);
registerKernel(CoeffParamDiffusion);
registerKernel(CoupledConvection);
registerKernel(ForcingFn);
registerKernel(MatDiffusion);
registerKernel(DiffMKernel);
registerKernel(GaussContForcing);
registerKernel(CoefDiffusion);
registerKernel(RestartDiffusion);
registerKernel(MatCoefDiffusion);
registerKernel(FuncCoefDiffusion);
registerKernel(CoefReaction);
registerKernel(Convection);
registerKernel(PolyDiffusion);
registerKernel(PolyConvection);
registerKernel(PolyForcing);
registerKernel(PolyReaction);
registerKernel(MMSImplicitEuler);
registerKernel(MMSDiffusion);
registerKernel(MMSConvection);
registerKernel(MMSForcing);
registerKernel(MMSReaction);
registerKernel(Diffusion0);
registerKernel(GenericDiffusion);
registerKernel(Advection0);
registerKernel(AdvDiffReaction1);
registerKernel(ForcingFunctionXYZ0);
registerKernel(TEJumpFFN);
registerKernel(NanKernel);
registerKernel(NanAtCountKernel);
registerKernel(ExceptionKernel);
registerKernel(MatConvection);
registerKernel(PPSDiffusion);
registerKernel(DefaultPostprocessorDiffusion);
registerKernel(DotCouplingKernel);
registerKernel(UserObjectKernel);
registerKernel(DiffusionPrecompute);
registerKernel(ConvectionPrecompute);
registerKernel(CoupledKernelGradTest);
registerKernel(CoupledKernelValueTest);
registerKernel(SplineFFn);
registerKernel(BlkResTestDiffusion);
registerKernel(DiffTensorKernel);
registerKernel(ScalarLagrangeMultiplier);
registerKernel(OptionallyCoupledForce);
registerKernel(FDDiffusion);
registerKernel(FDAdvection);
registerKernel(MaterialEigenKernel);
registerKernel(PHarmonic);
registerKernel(PMassEigenKernel);
registerKernel(CoupledEigenKernel);
registerKernel(ConsoleMessageKernel);
registerKernel(WrongJacobianDiffusion);
registerKernel(DefaultMatPropConsumerKernel);
registerKernel(DoNotCopyParametersKernel);
// Aux kernels
registerAux(CoupledAux);
registerAux(CoupledScalarAux);
registerAux(CoupledGradAux);
registerAux(PolyConstantAux);
registerAux(MMSConstantAux);
registerAux(MultipleUpdateAux);
registerAux(MultipleUpdateElemAux);
registerAux(PeriodicDistanceAux);
registerAux(MatPropUserObjectAux);
registerAux(SumNodalValuesAux);
registerAux(UniqueIDAux);
registerAux(RandomAux);
registerAux(PostprocessorAux);
registerAux(FluxAverageAux);
registerAux(OldMaterialAux);
registerAux(DotCouplingAux);
// DG kernels
registerDGKernel(DGMatDiffusion);
registerDGKernel(DGAdvection);
// Interface kernels
registerInterfaceKernel(InterfaceDiffusion);
// Boundary Conditions
registerBoundaryCondition(RobinBC);
registerBoundaryCondition(InflowBC);
registerBoundaryCondition(OutflowBC);
registerBoundaryCondition(MTBC);
registerBoundaryCondition(PolyCoupledDirichletBC);
registerBoundaryCondition(MMSCoupledDirichletBC);
registerBoundaryCondition(DirichletBCfuncXYZ0);
registerBoundaryCondition(TEJumpBC);
registerBoundaryCondition(OnOffDirichletBC);
registerBoundaryCondition(OnOffNeumannBC);
registerBoundaryCondition(ScalarVarBC);
registerBoundaryCondition(BndTestDirichletBC);
registerBoundaryCondition(MatTestNeumannBC);
//.........这里部分代码省略.........
开发者ID:JasonTurner56,项目名称:ARL,代码行数:101,代码来源:MooseTestApp.C
示例19: unregisterObject
/*!
\internal
\since 4.8
Registers a QDBusTreeNode for a path. It can handle a path including all child paths, thus
handling multiple DBus nodes.
To unregister a QDBusTreeNode use the unregisterObject() function with its path.
*/
bool QDBusConnection::registerVirtualObject(const QString &path, QDBusVirtualObject *treeNode,
VirtualObjectRegisterOption options)
{
int opts = options | QDBusConnectionPrivate::VirtualObject;
return registerObject(path, (QObject*) treeNode, (RegisterOptions) opts);
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:14,代码来源:qdbusconnection.cpp
示例20: implementation
//.........这里部分代码省略.........
}
out << "#include <qvariant.h>" << endl; // first for gcc 2.7.2
globalIncludes = unique(globalIncludes);
for (it = globalIncludes.begin(); it != globalIncludes.end(); ++it) {
if (!(*it).isEmpty())
out << "#include <" << fixHeaderName(*it) << '>' << endl;
}
if (externPixmaps) {
out << "#include <qimage.h>" << endl;
out << "#include <qpixmap.h>" << endl << endl;
}
/*
Put local includes after all global includes
*/
localIncludes = unique(localIncludes);
for (it = localIncludes.begin(); it != localIncludes.end(); ++it) {
if (!(*it).isEmpty() && *it != QFileInfo(fileName + QLatin1String(".h")).fileName())
out << "#include \"" << fixHeaderName(*it) << '\"' << endl;
}
QString uiDotH = fileName + QLatin1String(".h");
if (QFile::exists(uiDotH)) {
if (!outputFileName.isEmpty())
uiDotH = QString::fromUtf8(combinePath(uiDotH.ascii(), outputFileName.ascii()));
out << "#include \"" << uiDotH << '\"' << endl;
writeFunctImpl = false;
}
// register the object and unify its name
objName = registerObject(objName);
if (externPixmaps) {
pixmapLoaderFunction = QLatin1String("QPixmap::fromMimeSource");
}
// constructor
if (objClass == QLatin1String("QDialog") || objClass == QLatin1String("QWizard")) {
out << "/*" << endl;
out << " * Constructs a " << nameOfClass << " as a child of 'parent', with the" << endl;
out << " * name 'name' and widget flags set to 'f'." << endl;
out << " *" << endl;
out << " * The " << objClass.mid(1).toLower() << " will by default be modeless, unless you set 'modal' to" << endl;
out << " * true to construct a modal " << objClass.mid(1).toLower() << '.' << endl;
out << " */" << endl;
out << nameOfClass << "::" << bareNameOfClass << "(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)" << endl;
out << " : " << objClass << "(parent, name, modal, fl)";
} else if (objClass == QLatin1String("QWidget")) {
out << "/*" << endl;
out << " * Constructs a " << nameOfClass << " as a child of 'parent', with the" << endl;
out << " * name 'name' and widget flags set to 'f'." << endl;
out << " */" << endl;
out << nameOfClass << "::" << bareNameOfClass << "(QWidget* parent, const char* name, Qt::WindowFlags fl)" << endl;
out << " : " << objClass << "(parent, name, fl)";
} else if (objClass == QLatin1String("QMainWindow") || objClass == QLatin1String("Q3MainWindow")) {
out << "/*" << endl;
out << " * Constructs a " << nameOfClass << " as a child of 'parent', with the" << endl;
out << " * name 'name' and widget flags set to 'f'." << endl;
out << " *" << endl;
out << " */" << endl;
out << nameOfClass << "::" << bareNameOfClass << "(QWidget* parent, const char* name, Qt::WindowFlags fl)" << endl;
out << " : " << objClass << "(parent, name, fl)";
isMainWindow = true;
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.vendor,代码行数:67,代码来源:form.cpp
注:本文中的registerObject函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论