void printProperties(Properties* properties, unsigned int tabCount) { // Print the name and ID of the current namespace. const char* spacename = properties->getNamespace(); const char* id = properties->getId(); std::string tabs; for (unsigned int i = 0; i < tabCount; i++) { tabs.append("\t"); } GP_WARN("\n%s%s %s\n%s{", tabs.c_str(), spacename, id, tabs.c_str()); // Print all properties in this namespace. const char* name = properties->getNextProperty(); const char* value = NULL; while (name != NULL) { value = properties->getString(name); GP_WARN("%s\t%s = %s", tabs.c_str(), name, value); name = properties->getNextProperty(); } // Print the properties of every namespace within this one. Properties* space = properties->getNextNamespace(); while (space != NULL) { printProperties(space, tabCount+1); space = properties->getNextNamespace(); } GP_WARN("%s}", tabs.c_str()); }
static void printConnectors(int fd, uint32_t* ids, uint32_t count) { drmModeConnector *conn; int i; for (i = 0; i < count; i++) { conn = drmModeGetConnector(fd, ids[i]); if (!conn) { fprintf(stdout, " Connector %u: cannot retrieve (%d): %m\n\n", ids[i], errno); continue; } fprintf(stdout, " Connector %u:\n", conn->connector_id); fprintf(stdout, " Type: %s\n", getConnectorType(conn->connector_type)); fprintf(stdout, " Dimensions: %umm x %umm\n", conn->mmWidth, conn->mmHeight); fprintf(stdout, " SubPixel: %s\n", getConnectorSubPixel(conn->subpixel)); fprintf(stdout, " Connection: %s\n", getConnectorConnection(conn->connection)); fprintf(stdout, " Encoders: %d: %s\n", conn->count_encoders, getList32(conn->encoders, conn->count_encoders)); fprintf(stdout, " Properties: %d:\n", conn->count_props); printProperties(fd, conn->props, conn->prop_values, conn->count_props); fprintf(stdout, " Modes: %d:\n", conn->count_modes); printModes(conn->modes, conn->count_modes); fprintf(stdout, "\n"); drmModeFreeConnector(conn); } }
void printProxy(struct proxyParams * pp) { char *name_owner; name_owner = g_dbus_proxy_get_name_owner(pp->proxy); if (name_owner != NULL) { debug("+++ Proxy object points to remote object owned by %s\n" " name: %s\n" " object path: %s\n" " interface: %s\n", name_owner, pp->name, pp->path, pp->interface); printProperties (pp->proxy); } else { debug("--- Proxy object is inert - there is no name owner for the name\n" " name: %s\n" " object path: %s\n" " interface: %s\n", pp->name, pp->path, pp->interface); } g_free (name_owner); }
// Print resource information include its properties STATIC void fullPrintResource(FILE *ofp, const char *header, const void *u) { const resourceData *entity = NULL; printResource(ofp, header, u); if (u == NULL) return; entity = (const resourceData *)u; printProperties(ofp, entity->PropertiesData); }
int main(int argc, char *argv[]) { VisibilityExtractionDemo demo; demo.perspectiveProj = true; demo.init(); printProperties(); demo.run(); }
void com::tecnyse::integration::JNIBridge::start() { std::string jvm_class_path; const size_t nb_jars = jars.size(); if ( nb_jars == 0 ) { jvm_class_path = ""; } else { jvm_class_path = "-Djava.class.path="; for ( size_t i = 0; i < nb_jars; i++ ) { jvm_class_path += jars[ i ]; #if defined(WINDOWS) jvm_class_path += ";"; #else jvm_class_path += ":"; #endif } } const std::string str_java_library_path = buildLibraryPath(); const size_t nb_of_options = jvm_args.size() + 2; JavaVMOption* options = new JavaVMOption[nb_of_options]; options[ 0 ].optionString = const_cast<char*>( jvm_class_path.c_str() ); options[ 1 ].optionString = const_cast<char*>( str_java_library_path.c_str() ); int index = 2; for ( std::vector<std::string>::iterator it = jvm_args.begin(); it != jvm_args.end(); ++it ) { options[ index++ ].optionString = const_cast<char*>( it->c_str() ); } JavaVMInitArgs vm_args; vm_args.version = JNI_VERSION_1_6; vm_args.options = options; vm_args.nOptions = nb_of_options; vm_args.ignoreUnrecognized = JNI_TRUE; for ( int i = 0; i < nb_of_options; ++i ) { std::cout << "JVM Option: " << options[ i ].optionString << std::endl; } //Create the JVM JNIEnv* jni_env; jint result = JNI_CreateJavaVM(&running_jvm_instance, reinterpret_cast<void**>(&jni_env), &vm_args); if ( result < 0 ) { throw std::runtime_error( "Could not launch the JVM" ); } std::cout << "JVM loaded" << std::endl; printProperties(); }
void HtmlRenderer::process(Response& response, ResponseStream& stream, bool noContent) { m_iter = new ResponseIterator(response); m_response = &response; readTemplate(); { Replacement googleChart; m_reps.push_back(googleChart); Replacement& googleChartRep = m_reps.back(); googleChartRep.m_found = findGoogleChart(googleChartRep.m_open, googleChartRep.m_close); if (googleChartRep.m_found) { switch (m_iter->type()) { case TABLE_PROPERTIES: printGoogleChartProperties(response, stream); break; case TABLE_LIST: printGoogleChartList(response, stream); break; case TABLE_TIME_SERIES: printGoogleChartTimeSeries(response, stream); break; } return; } else { m_reps.clear(); } } switch (m_iter->type()) { case TABLE_PROPERTIES: printProperties(response, stream, noContent); break; case TABLE_LIST: THROW("Cannot plot list"); break; case TABLE_TIME_SERIES: printTimeSeries(response, stream, noContent); break; } }
string ExactInf::identify() const { return string(Name) + printProperties(); }
string MF::identify() const { return string(Name) + printProperties(); }
void getPluginProperties( const std::string& plugName ) { tth::ofx::imageEffect::OfxhImageEffectPlugin* plug = tth::Core::instance().getImageEffectPluginById( plugName ); if( !plug ) { TUTTLE_COUT( _color._red << "no plugin match to: " << plugName << _color._std ); return; } plug->loadAndDescribeActions(); TUTTLE_COUT("Identifier:\t\t" << plug->getIdentifier() ); TUTTLE_COUT("Raw identifier:\t\t" << plug->getRawIdentifier() ); TUTTLE_COUT("Minor version:\t\t" << plug->getVersionMinor() ); TUTTLE_COUT("Major version:\t\t" << plug->getVersionMajor() ); TUTTLE_COUT("API version:\t\t" << plug->getApiVersion() ); // list contexts of plugin TUTTLE_COUT( _color._green << "Contexts:" << _color._std ); tth::ofx::imageEffect::OfxhImageEffectPlugin::ContextSet contexts = plug->getContexts(); tth::ofx::imageEffect::OfxhImageEffectPlugin::ContextSet::iterator itContext; std::string strContexts; for( itContext = contexts.begin(); itContext != contexts.end(); ++itContext ) { strContexts += *itContext + ", "; } strContexts.erase(strContexts.size()-2, 2); TUTTLE_COUT( "[ " << strContexts << " ]" ); itContext = contexts.begin(); // list properties of plugin for the first context if( properties ) { TUTTLE_COUT( std::endl << _color._red << "Properties" << _color._std ); const tth::ofx::property::OfxhSet properties = plug->getDescriptorInContext( *itContext ).getProperties(); printProperties( properties ); } tth::ofx::imageEffect::OfxhImageEffectNode* plugInst = NULL; if( clips | parameters ) { if( plug->supportsContext( kOfxImageEffectContextReader ) ) { plugInst = plug->createInstance( kOfxImageEffectContextReader ); } else if( plug->supportsContext( kOfxImageEffectContextWriter ) ) { plugInst = plug->createInstance( kOfxImageEffectContextWriter ); } else if( plug->supportsContext( kOfxImageEffectContextGenerator ) ) { plugInst = plug->createInstance( kOfxImageEffectContextGenerator ); } else if( plug->supportsContext( kOfxImageEffectContextFilter ) ) { plugInst = plug->createInstance( kOfxImageEffectContextFilter ); } else if( plug->supportsContext( kOfxImageEffectContextGeneral ) ) { plugInst = plug->createInstance( kOfxImageEffectContextGeneral ); } else { TUTTLE_CERR( _color._error << "Plugin contexts not supported by the host. (" + plugName + ")" << _color._std ); return; } } if( clips ) { TUTTLE_COUT( std::endl << _color._red << "Clips" << _color._std ); typedef std::map<std::string, tth::ofx::attribute::OfxhClipImageDescriptor*> ContextMap; // get contexts ContextMap::const_iterator it = plugInst->getDescriptor( ).getClips().begin(); std::string strClipContexts; for( ; it != plugInst->getDescriptor( ).getClips().end(); ++it ) { strClipContexts += (*it).first + ", " ; } strClipContexts.erase( strClipContexts.size()-2, 2 ); TUTTLE_COUT( _color._green << "[ " << strClipContexts << " ]" << _color._std ); // get propeties in each context ContextMap::const_iterator it2 = plugInst->getDescriptor( ).getClips().begin(); for( ; it2 != plugInst->getDescriptor().getClips().end(); ++it2 ) { printProperties( (*it2).second->getProperties(), (*it2).first ); } } if( parameters ) { TUTTLE_COUT( std::endl << _color._red << "Parameters" << _color._std ); typedef std::map<std::string, tth::ofx::attribute::OfxhParamDescriptor*> ParamDescriptorMap; // get contexts ParamDescriptorMap::const_iterator it = plugInst->getDescriptor( ).getParams().begin(); std::string strParamsContexts; for( ; it != plugInst->getDescriptor( ).getParams().end(); ++it ) { strParamsContexts += (*it).first + ", "; } strParamsContexts.erase( strParamsContexts.size()-2, 2 ); TUTTLE_COUT( _color._green << "[ " << strParamsContexts << " ]" << _color._std ); // get propeties in each context ParamDescriptorMap::const_iterator it2 = plugInst->getDescriptor( ).getParams().begin(); for( ; it2 != plugInst->getDescriptor().getParams().end(); it2++ ) { printProperties( (*it2).second->getProperties(), (*it2).first ); } /* const tth::ofx::property::OfxhSet paramProperties = plugInst->getDescriptor( ).getParamList().front().getProperties(); printProperties( paramProperties, "" ); */ } }