141 lines
4.0 KiB
C++
141 lines
4.0 KiB
C++
//////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright 2016 Autodesk, Inc. All rights reserved.
|
|
//
|
|
// Use of this software is subject to the terms of the Autodesk license
|
|
// agreement provided at the time of installation or download, or which
|
|
// otherwise accompanies this software.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
#include "../../Core/Base.h"
|
|
#include "../CAMTypeDefs.h"
|
|
#include <string>
|
|
|
|
// THIS CLASS WILL BE VISIBLE TO AN API CLIENT.
|
|
// THIS HEADER FILE WILL BE GENERATED FROM NIDL.
|
|
#include "../../Core/OSMacros.h"
|
|
|
|
#ifdef CAMXINTERFACE_EXPORTS
|
|
# ifdef __COMPILING_ADSK_CAM_CAMLIBRARYMANAGER_CPP__
|
|
# define ADSK_CAM_CAMLIBRARYMANAGER_API XI_EXPORT
|
|
# else
|
|
# define ADSK_CAM_CAMLIBRARYMANAGER_API
|
|
# endif
|
|
#else
|
|
# define ADSK_CAM_CAMLIBRARYMANAGER_API XI_IMPORT
|
|
#endif
|
|
|
|
namespace adsk { namespace cam {
|
|
|
|
/// CAMLibraryManager provides access to properties related to various libraries in the
|
|
/// Fusion 360 Manufacture workspace, such as the post library and machine library.
|
|
class CAMLibraryManager : public core::Base {
|
|
public:
|
|
|
|
/// Gets the absolute path to the folder containing Fusion 360 posts. Fusion 360 posts
|
|
/// appear in the post library under the Fusion 360 tab.
|
|
std::string fusion360PostFolder() const;
|
|
|
|
/// Gets the absolute path to the folder containing local posts. Local posts appear
|
|
/// in post library under the local tab.
|
|
std::string localPostFolder() const;
|
|
|
|
/// Gets the absolute path to the folder containing Fusion 360 machines. Fusion 360
|
|
/// machines appear in the machine library under the Fusion 360 tab.
|
|
std::string fusion360MachineFolder() const;
|
|
|
|
/// Gets the absolute path to the folder containing local machines. Local Machines appear
|
|
/// in machine library under the local tab.
|
|
std::string localMachineFolder() const;
|
|
|
|
/// Gets the absolute path to the folder containing network machines. Network machines
|
|
/// appear in the machine library under the network tab.
|
|
std::string networkMachineFolder() const;
|
|
|
|
ADSK_CAM_CAMLIBRARYMANAGER_API static const char* classType();
|
|
ADSK_CAM_CAMLIBRARYMANAGER_API const char* objectType() const override;
|
|
ADSK_CAM_CAMLIBRARYMANAGER_API void* queryInterface(const char* id) const override;
|
|
ADSK_CAM_CAMLIBRARYMANAGER_API static const char* interfaceId() { return classType(); }
|
|
|
|
private:
|
|
|
|
// Raw interface
|
|
virtual char* fusion360PostFolder_raw() const = 0;
|
|
virtual char* localPostFolder_raw() const = 0;
|
|
virtual char* fusion360MachineFolder_raw() const = 0;
|
|
virtual char* localMachineFolder_raw() const = 0;
|
|
virtual char* networkMachineFolder_raw() const = 0;
|
|
};
|
|
|
|
// Inline wrappers
|
|
|
|
inline std::string CAMLibraryManager::fusion360PostFolder() const
|
|
{
|
|
std::string res;
|
|
|
|
char* p= fusion360PostFolder_raw();
|
|
if (p)
|
|
{
|
|
res = p;
|
|
core::DeallocateArray(p);
|
|
}
|
|
return res;
|
|
}
|
|
|
|
inline std::string CAMLibraryManager::localPostFolder() const
|
|
{
|
|
std::string res;
|
|
|
|
char* p= localPostFolder_raw();
|
|
if (p)
|
|
{
|
|
res = p;
|
|
core::DeallocateArray(p);
|
|
}
|
|
return res;
|
|
}
|
|
|
|
inline std::string CAMLibraryManager::fusion360MachineFolder() const
|
|
{
|
|
std::string res;
|
|
|
|
char* p= fusion360MachineFolder_raw();
|
|
if (p)
|
|
{
|
|
res = p;
|
|
core::DeallocateArray(p);
|
|
}
|
|
return res;
|
|
}
|
|
|
|
inline std::string CAMLibraryManager::localMachineFolder() const
|
|
{
|
|
std::string res;
|
|
|
|
char* p= localMachineFolder_raw();
|
|
if (p)
|
|
{
|
|
res = p;
|
|
core::DeallocateArray(p);
|
|
}
|
|
return res;
|
|
}
|
|
|
|
inline std::string CAMLibraryManager::networkMachineFolder() const
|
|
{
|
|
std::string res;
|
|
|
|
char* p= networkMachineFolder_raw();
|
|
if (p)
|
|
{
|
|
res = p;
|
|
core::DeallocateArray(p);
|
|
}
|
|
return res;
|
|
}
|
|
}// namespace cam
|
|
}// namespace adsk
|
|
|
|
#undef ADSK_CAM_CAMLIBRARYMANAGER_API |