Where possible moved redundent C header includes from headers to source files
This commit is contained in:
@@ -15,20 +15,10 @@
|
||||
#define OSG_REFERENCED 1
|
||||
|
||||
// When building OSG with Java need to derive from Noodle::CBridgable class,
|
||||
// therefore so OSG_JAVA_BUILD must be defined. Also the thread-safe ref/unref test
|
||||
// as built in for the NoodleGlue wrapping. NoodleGlue has a Garbage collector mechanism
|
||||
// which is very similar to osg::DeletionManager. So these aspects of osg::Referenced
|
||||
// have been removed
|
||||
//#define OSG_JAVA_BUILD
|
||||
|
||||
#include <osg/Export>
|
||||
|
||||
#ifdef OSG_JAVA_BUILD
|
||||
#include <NoodleGlue/Bridgable.h>
|
||||
#else
|
||||
#include <OpenThreads/ScopedLock>
|
||||
#include <OpenThreads/Mutex>
|
||||
#endif
|
||||
|
||||
#include <OpenThreads/Atomic>
|
||||
#if !defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
|
||||
@@ -37,7 +27,6 @@
|
||||
|
||||
namespace osg {
|
||||
|
||||
#ifndef OSG_JAVA_BUILD
|
||||
// forward declare, declared after Referenced below.
|
||||
class DeleteHandler;
|
||||
class Observer;
|
||||
@@ -193,36 +182,6 @@ inline void Referenced::unref() const
|
||||
inline void intrusive_ptr_add_ref(Referenced* p) { p->ref(); }
|
||||
inline void intrusive_ptr_release(Referenced* p) { p->unref(); }
|
||||
|
||||
#else
|
||||
|
||||
/** Java wrappers use the CBridgable base-class for referencing
|
||||
* and garbage collection.
|
||||
*/
|
||||
class OSG_EXPORT Referenced : public NoodleGlue::CBridgable
|
||||
{
|
||||
public:
|
||||
/** Method not used in NoodleGlue referencing
|
||||
*/
|
||||
inline void unref_nodelete() const { --_refCount; }
|
||||
inline int referenceCount() const { return _refCount; }
|
||||
|
||||
/* These methods are not used in JavaOSG */
|
||||
void addObserver(Observer* observer) {}
|
||||
void removeObserver(Observer* observer) {}
|
||||
|
||||
public:
|
||||
|
||||
/** Set whether reference counting should be use a mutex to create thread reference counting.*/
|
||||
static void setThreadSafeReferenceCounting(bool enableThreadSafeReferenceCounting) {}
|
||||
|
||||
/** Get whether reference counting is active. */
|
||||
static bool getThreadSafeReferenceCounting() { return true; }
|
||||
|
||||
protected:
|
||||
virtual ~Referenced() {}
|
||||
};
|
||||
#endif //OSG_JAVA_BUILD
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <osgDB/Export>
|
||||
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
namespace std
|
||||
@@ -30,14 +29,14 @@ typedef basic_string<wchar_t> wstring;
|
||||
namespace osgDB
|
||||
{
|
||||
|
||||
std::string OSGDB_EXPORT convertUTF16toUTF8(const wchar_t* source, unsigned sourceLength);
|
||||
std::wstring OSGDB_EXPORT convertUTF8toUTF16(const char* source, unsigned sourceLength);
|
||||
extern OSGDB_EXPORT std::string convertUTF16toUTF8(const wchar_t* source, unsigned sourceLength);
|
||||
extern OSGDB_EXPORT std::wstring convertUTF8toUTF16(const char* source, unsigned sourceLength);
|
||||
|
||||
inline std::string convertUTF16toUTF8(const std::wstring& s){return convertUTF16toUTF8(s.c_str(), s.length());}
|
||||
inline std::string convertUTF16toUTF8(const wchar_t* s){return convertUTF16toUTF8(s, wcslen(s));}
|
||||
extern OSGDB_EXPORT std::string convertUTF16toUTF8(const std::wstring& s);
|
||||
extern OSGDB_EXPORT std::string convertUTF16toUTF8(const wchar_t* s);
|
||||
|
||||
inline std::wstring convertUTF8toUTF16(const std::string& s){return convertUTF8toUTF16(s.c_str(), s.length());}
|
||||
inline std::wstring convertUTF8toUTF16(const char* s){return convertUTF8toUTF16(s, strlen(s));}
|
||||
extern OSGDB_EXPORT std::wstring convertUTF8toUTF16(const std::string& s);
|
||||
extern OSGDB_EXPORT std::wstring convertUTF8toUTF16(const char* s);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
//#include <stdlib.h>
|
||||
|
||||
namespace osgDB {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <osgDB/Export>
|
||||
|
||||
#include <string>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace osgDB {
|
||||
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
|
||||
#include <osgDB/Export>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <istream>
|
||||
|
||||
namespace osgDB {
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#include <deque>
|
||||
#include <string>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
namespace osgDB {
|
||||
|
||||
enum CaseSensitivity
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
#ifndef OSGSIM_SHAPEATTRIBUTE
|
||||
#define OSGSIM_SHAPEATTRIBUTE 1
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <vector>
|
||||
|
||||
#include <osg/Object>
|
||||
@@ -63,7 +61,7 @@ class OSGSIM_EXPORT ShapeAttribute
|
||||
|
||||
void setValue(int value) { free(); _type = INTEGER; _integer = value; }
|
||||
void setValue(double value) { free(); _type = DOUBLE; _double = value; }
|
||||
void setValue(const char * value) { free(); _type = STRING; _string = (value ? strdup(value) : 0); }
|
||||
void setValue(const char * value);
|
||||
|
||||
/** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/
|
||||
int compare(const osgSim::ShapeAttribute& sa) const;
|
||||
|
||||
Reference in New Issue
Block a user