I'd like to add verbose information about my core classes without embedding it all above those classes in the source file.
For instance, I'd like to create a separate file with voluminous info about class Foo, probably in markdown or html. Then when I view class Foo in the doxygen-created output, I'd like the class page for Foo to contain all my voluminous and beautifully marked up documentation in its details section along with any other comments I did put above class Foo.
Is this possible?
If you currently have a file Foo.h
/**
A short description of class Foo.
*/
class Foo
{
}
You can add additional documentation in a file with a .dox extension (let's call it Foo.dox)
/**
More details about Foo.
Maybe you only want to distribute this to your nicer customers.
#class Foo Foo.h
*/
Don't forget to add the .dox file to the INPUT line of your configuration file
INPUT = \
Foo.h Foo.dox
Related
I want to use Nepomuk File Ontology (NFO) in a desktop software. Before starting I need some guidance on using NFO.
Forexample:
In NFO we have File class and Image classes.
File Class properties are: nfo:fileCreated, nfo:fileLastAccessed, nfo:fileLastModified, nfo:fileName, nfo:fileOwner, nfo:fileSize, nfo:fileUrl, nfo:hasHash, nfo:permissions.
And Image Class properties are: nfo:depicts, nfo:horizontalResolution, nfo:verticalResolution
Now Please guide, I have an image file i.e imagefile1.jpeg on which I want to apply properties of both File and Image classes.
which one of the below two methods is the correct method to do so.
Method 1: Create a single Object i.e. obj1 of type File and Image. So
now I can annotate obj1 on properties of File class as well as Image
Class.
Method 2: Create two objects, one of type File i.e. obj1 and second
object of type Image i.e. obj2. and now link these two objects via
interpretedAs and isStoredAs properties.
Please guide me which one is the correct approach so that I follow it in my application.
"InformationElement is a piece of information stored within a data
object. Content-specific properties are defined as properties of an
InformationElement. It is separate from the DataObject in order to
make the interpretation independent of the representation."
Source
Also have a look at the description of data objects
So Method 2 is the way to go, to "apply" the different abstractions the ontology intends.
I have a structure called NDPlane, and I want to put it in its own file by following this answer.
To avoid confusion as this just being an Objective-C interface for an NDPlane object, how should I name the file? ndplane.h, plane.h, or struct_NDPlane.h, etc...
I'm looking for something like private attribute working not with class members, but with module entities. Functions, classes, enumerators etc.
For instance, in Erlang there is an export attribute, which goes like this: -export([fun1, fun2]), meaning only fun1 and fun2 of all the functions in the module would be exported. In D everything seems to be exported by default, which is ok, but is there a way to prevent something specific from that?
In the module being imported, you can mark anything private to keep it from being accessible from other modules. private works the same way on module level entities as it does on class members - inaccessible outside the module, usable inside the module. However, currently it is still visible, so it can create silly errors like "private function foo from module A conflicts with function foo from module B", forcing you to disambiguate the name. (I, and several others, are hoping to get this changed at some point, since it obviously shouldn't be a problem!)
In the module doing the importing, you can't say "import all except", but you can import a list of specific names without importing others:
import std.stdio : File, writefln;
void main() {
File f; // cool
writefln("hello"); // cool
writeln("hey"); // "Error: 'writeln' is not defined" - the selective import didn't pull this name at all
}
I have a DataClass.h
#interface DataClass : NSObject
{
}
enum knownTypes
{
type1 = 0,
type2,
type3,
UnknownType = -1
};
Is there a way I can specify knownTypes in .m file and access from other class.
This is Util class i am creating, hence don't want to create an object to access the values in this class.
for ex: in TestClass.m , by importing DataClass.h , now i can use the enum values as type1,type2.. but if i declare the enum data in DataClass.m , i could not use those enum values.
This has nothing to do with classes. This is a feature of C.
If you define a type or an enum in a .h file, you can use it by importing it (#import) where you need it.
If you define your enum in a .c or .m file, only elements after that definition in the file can use it.
In your case, it appears that you need the same enum in two different files. Usage is to define that enum in a separate file, e.g., knownTypes.h and import that file in the two files using it: DataClass.m and TestClass.m.
If TestClass is for testing purpose, then your current organization is OK: enum is declared in DataClass.h and both DataClass.m and TestClass.m import DataClass.h.
No, if you define the enum in the source file instead of the header, then only that source file will be able to utilise the identifiers used in the enum. If you want to keep it “private” but usable by more than one source file, put it in a separate header and include this separate header in both source files.
I was not able to reference a specific class method using the doxygen #see command.
Suppose I have a class Server with a method start like below
#interface Server : NSObject
- (void) start:(NSInteger) mask;
#end
And suppose I have another class that has an object of Server.
#interface RandomNumberGeneration
/// How can I reference the method start from
/// class server using the command #see
/// #see ????
+ (NSInteger) generate;
#end
So, is there a way to reference the method start of class Server?
Copied from here
#see text | URL | classname | classname#methodname Use this to tag to
refer the reader to some other source of related information.
So I guess it should be:
/// #see Server#start:
See the doxygen manual page Automatic link generation for more information on referencing classes and functions. In particular see the section "Links to Functions".
Typically, I use the function refernce pattern
<className>::<functionName>
So in your case, I would use
/// \see Server::start
However, from the doxygen manual
For JavaDoc compatibility a # may be used instead of a :: in the patterns above
as stated in #PeterG.'s answer.
For completeness, note that if you a reference a member in the same class
In the documentation of a class containing a member foo, a reference to a global variable is made using ::foo, whereas #foo will link to the member.