Sponsored Content
Full Discussion: Documenting code
Top Forums Programming Documenting code Post 302526858 by kristinu on Wednesday 1st of June 2011 03:23:32 PM
Old 06-01-2011
I can put documentation for the interface (parameters, return value, what the function does) in the interface file (.h), and the documentation for the implementation (how the function does) in the implementation file (.c, .cpp, .m).

I can also document the interface (return values, argument, state changes, etc) before the member function implementation, and high-level architectural overviews in separate documents (to give a broader view of how everything is put together; it's hard to place this together with the code, since it usually references several classes at once).

I write an overview of the class just before its declaration, so the reader has immediate basic information.
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Documenting a Shell Script

I've been working on a very long shell script that's becoming a mini-application. It is my first script, and continues to grow each week, becoming more and more complex. I've been asked to document my script, beginning with basic information and then detailing any information about its... (1 Reply)
Discussion started by: yongho
1 Replies

2. UNIX for Dummies Questions & Answers

Any easy way of documenting cron entries?

I've been asked to do a high level summary of the cron jobs which run against a number of systems (to understand the potential scope for rewriting some of our core systems)...and was wondering how people have done this in the past. I've got approx 400 cron entries to go through. I will have... (2 Replies)
Discussion started by: GavP
2 Replies

3. Shell Programming and Scripting

Script Help -- documenting specific users that log into server

Hello All, I am trying trying to write a shell script that will do a couple things: 1.) Identify any username that logs into the server. 2.) When the user logs out, send them an email detailing their log in/out times, duration logged in, and what processes they ran. Basically,... (3 Replies)
Discussion started by: SecureScript
3 Replies

4. Shell Programming and Scripting

Documenting files with sed

All, I am looking for a way to improve this small one liner. one of the files has this kind of format public func <<<T>(array: , offset: Int) -> { return array.shiftedLeft(by: offset) } gsed -i '/public func/i /\/\/\public func \n/\/\==mark==public func' tresults in ///public func ... (5 Replies)
Discussion started by: f77hack
5 Replies

5. Web Development

Documenting Installation Problem with vue-beautiful-chat

REF: https://github.com/mattmezza/vue-beautiful-chat $ git clone https://github.com/mattmezza/vue-beautiful-chat.git Cloning into 'vue-beautiful-chat'... remote: Enumerating objects: 534, done. remote: Total 534 (delta 0), reused 0 (delta 0), pack-reused 534 Receiving objects: 100%... (2 Replies)
Discussion started by: Neo
2 Replies
QXmlReader(3qt) 														   QXmlReader(3qt)

NAME
QXmlReader - Interface for XML readers (i.e. parsers) SYNOPSIS
#include <qxml.h> Inherited by QXmlSimpleReader. Public Members virtual bool feature ( const QString & name, bool * ok = 0 ) const = 0 virtual void setFeature ( const QString & name, bool value ) = 0 virtual bool hasFeature ( const QString & name ) const = 0 virtual void * property ( const QString & name, bool * ok = 0 ) const = 0 virtual void setProperty ( const QString & name, void * value ) = 0 virtual bool hasProperty ( const QString & name ) const = 0 virtual void setEntityResolver ( QXmlEntityResolver * handler ) = 0 virtual QXmlEntityResolver * entityResolver () const = 0 virtual void setDTDHandler ( QXmlDTDHandler * handler ) = 0 virtual QXmlDTDHandler * DTDHandler () const = 0 virtual void setContentHandler ( QXmlContentHandler * handler ) = 0 virtual QXmlContentHandler * contentHandler () const = 0 virtual void setErrorHandler ( QXmlErrorHandler * handler ) = 0 virtual QXmlErrorHandler * errorHandler () const = 0 virtual void setLexicalHandler ( QXmlLexicalHandler * handler ) = 0 virtual QXmlLexicalHandler * lexicalHandler () const = 0 virtual void setDeclHandler ( QXmlDeclHandler * handler ) = 0 virtual QXmlDeclHandler * declHandler () const = 0 virtual bool parse ( const QXmlInputSource & input ) = 0 (obsolete) virtual bool parse ( const QXmlInputSource * input ) = 0 DESCRIPTION
The QXmlReader class provides an interface for XML readers (i.e. parsers). This abstract class provides an interface for all Qt's XML readers. Currently there is only one implementation of a reader included in Qt's XML module: QXmlSimpleReader. In future releases there might be more readers with different properties available (e.g. a validating parser). The design of the XML classes follows the SAX2 Java interface, with the names adapted to fit Qt naming conventions. It should be very easy for anybody who has worked with SAX2 to get started with the Qt XML classes. All readers use the class QXmlInputSource to read the input document. Since you are normally interested in particular content in the XML document, the reader reports the content through special handler classes (QXmlDTDHandler, QXmlDeclHandler, QXmlContentHandler, QXmlEntityResolver, QXmlErrorHandler and QXmlLexicalHandler), which you must subclass, if you want to process the contents. Since the handler classes only describe interfaces you must implement all functions. We provide the QXmlDefaultHandler class to make this easier: it implements a default behaviour (do nothing) for all functions, so you can subclass it and just implement the functions you are interested in. Features and properties of the reader can be set with setFeature() and setProperty() respectively. You can set the reader to use your own subclasses with setEntityResolver(), setDTDHandler(), setContentHandler(), setErrorHandler(), setLexicalHandler() and setDeclHandler(). The parse itself is started with a call to parse(). See also QXmlSimpleReader and XML. MEMBER FUNCTION DOCUMENTATION
QXmlDTDHandler * QXmlReader::DTDHandler () const [pure virtual] Returns the DTD handler or 0 if none was set. See also setDTDHandler(). QXmlContentHandler * QXmlReader::contentHandler () const [pure virtual] Returns the content handler or 0 if none was set. See also setContentHandler(). QXmlDeclHandler * QXmlReader::declHandler () const [pure virtual] Returns the declaration handler or 0 if none was set. See also setDeclHandler(). QXmlEntityResolver * QXmlReader::entityResolver () const [pure virtual] Returns the entity resolver or 0 if none was set. See also setEntityResolver(). QXmlErrorHandler * QXmlReader::errorHandler () const [pure virtual] Returns the error handler or 0 if none was set. See also setErrorHandler(). bool QXmlReader::feature ( const QString & name, bool * ok = 0 ) const [pure virtual] If the reader has the feature called name, the feature's value is returned. If no such feature exists the return value is undefined. If ok is not 0: *ok is set to TRUE if the reader has the feature called name; otherwise *ok is set to FALSE. See also setFeature() and hasFeature(). bool QXmlReader::hasFeature ( const QString & name ) const [pure virtual] Returns TRUE if the reader has the feature called name; otherwise returns FALSE. See also feature() and setFeature(). bool QXmlReader::hasProperty ( const QString & name ) const [pure virtual] Returns TRUE if the reader has the property name; otherwise returns FALSE. See also property() and setProperty(). QXmlLexicalHandler * QXmlReader::lexicalHandler () const [pure virtual] Returns the lexical handler or 0 if none was set. See also setLexicalHandler(). bool QXmlReader::parse ( const QXmlInputSource * input ) [pure virtual] Reads an XML document from input and parses it. Returns TRUE if the parsing was successful; otherwise returns FALSE. Example: xml/tagreader/tagreader.cpp. bool QXmlReader::parse ( const QXmlInputSource & input ) [pure virtual] This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. void * QXmlReader::property ( const QString & name, bool * ok = 0 ) const [pure virtual] If the reader has the property name, this function returns the value of the property; otherwise the return value is undefined. If ok is not 0: if the reader has the name property *ok is set to TRUE; otherwise *ok is set to FALSE. See also setProperty() and hasProperty(). void QXmlReader::setContentHandler ( QXmlContentHandler * handler ) [pure virtual] Sets the content handler to handler. See also contentHandler(). Example: xml/tagreader/tagreader.cpp. void QXmlReader::setDTDHandler ( QXmlDTDHandler * handler ) [pure virtual] Sets the DTD handler to handler. See also DTDHandler(). void QXmlReader::setDeclHandler ( QXmlDeclHandler * handler ) [pure virtual] Sets the declaration handler to handler. See also declHandler(). void QXmlReader::setEntityResolver ( QXmlEntityResolver * handler ) [pure virtual] Sets the entity resolver to handler. See also entityResolver(). void QXmlReader::setErrorHandler ( QXmlErrorHandler * handler ) [pure virtual] Sets the error handler to handler. Clears the error handler if handler is 0. See also errorHandler(). void QXmlReader::setFeature ( const QString & name, bool value ) [pure virtual] Sets the feature called name to the given value. If the reader doesn't have the feature nothing happens. See also feature() and hasFeature(). void QXmlReader::setLexicalHandler ( QXmlLexicalHandler * handler ) [pure virtual] Sets the lexical handler to handler. See also lexicalHandler(). void QXmlReader::setProperty ( const QString & name, void * value ) [pure virtual] Sets the property name to value. If the reader doesn't have the property nothing happens. See also property() and hasProperty(). SEE ALSO
http://doc.trolltech.com/qxmlreader.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qxmlreader.3qt) and the Qt version (3.1.1). Trolltech AS 9 December 2002 QXmlReader(3qt)
All times are GMT -4. The time now is 03:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy