graveyard/tools/org/apache/axis/tools/common/InputCppSourceCode.java
/**
	 * Find out whether we are defining a class, struct or extern "C" which
	 * may contain function implementations. These will have braces which 
	 * begin a new scope. Ignore function prototypes that return a struct.
	 * struct mystr { int f1; };
	 * struct mystr func();
	 * struct mystr func() { struct mystr a; return a; }
	 */
Find out whether we are defining a class, struct or extern "C" which
may contain function implementations. These will have braces which
begin a new scope. Ignore function prototypes that return a struct.
struct mystr { int f1; };
struct mystr func();
struct mystr func() { struct mystr a; return a; }
Find out whether we are defining a class struct or extern " C " which may contain function implementations . These will have braces which begin a new scope . Ignore function prototypes that return a struct . struct mystr { int f1 ; } ; struct mystr func () ; struct mystr func () { struct mystr a ; return a ; }
private static boolean beginsScope(String s) throws ParsingException {
		if (isMethod(s))
			return false;
		int brace = Utils.indexOf(s, '{');
		int semicolon = Utils.indexOf(s, ';');
		if (Utils.startsWith(s, "class")) {
			if (-1 == brace)
				return false;
			if (-1 == semicolon)
				return true;
			return brace < semicolon;
		}
		if (Utils.startsWith(s, "struct")) {
			if (-1 == brace || -1 == semicolon)
				return false;
			return brace < semicolon;
		}
		return startsWithExternScope(s);
	}
private static boolean beginsScope ( String s ) throws ParsingException { if ( isMethod ( s ) ) return false ; int brace = Utils . indexOf ( s , '{' ) ; int semicolon = Utils . indexOf ( s , ';' ) ; if ( Utils . startsWith ( s , "class" ) ) { if ( - 1 == brace ) return false ; if ( - 1 == semicolon ) return true ; return brace < semicolon ; } if ( Utils . startsWith ( s , "struct" ) ) { if ( - 1 == brace || - 1 == semicolon ) return false ; return brace < semicolon ; } return startsWithExternScope ( s ) ; }
Find out whether we are defining a class, struct or extern "C" which
 may contain function implementations.
Find out whether we are defining a class struct or extern " C " which may contain function implementations .
// Return false for class prototypes, but true for class definitions.