Skip to content

Commit

Permalink
Document Object.getNObject & refCount are debug
Browse files Browse the repository at this point in the history
Document the fact that Object.getNObject and refCount
are only for debugging astshim.
  • Loading branch information
r-owen committed May 25, 2017
1 parent 644dcfc commit 6111211
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
15 changes: 12 additions & 3 deletions include/astshim/Object.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,22 @@ class Object {
/// Get @ref Object_Ident "Ident": object identification string that is copied.
std::string getIdent() const { return getC("Ident"); }

/// Get @ref Object_NObject "NObject": number of Objects in class.
/**
Get @ref Object_NObject "NObject": number of AST objects in existence of the same type
as the underlying AST class.
@warning Intended only for debugging astshim.
*/
int getNObject() const { return getI("NObject"); }

/// Get @ref Object_ObjSize "ObjSize": the in-memory size of the Object in bytes.
/// Get @ref Object_ObjSize "ObjSize": the in-memory size of the AST object in bytes.
int getObjSize() const { return getI("ObjSize"); }

/// Get @ref Object_RefCount "RefCount": count of active Object pointers
/**
Get @ref Object_RefCount "RefCount": number of active pointers to the underlying AST object
@warning Intended only for debugging astshim.
*/
int getRefCount() const { return getI("RefCount"); }

/// Get @ref Object_UseDefs "UseDefs": allow use of default values for Object attributes?
Expand Down
2 changes: 2 additions & 0 deletions include/astshim/detail/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
namespace ast {
namespace detail {

class Object

static const int FITSLEN = 80;

/// A wrapper around astAnnul; intended as a custom deleter for std::unique_ptr
Expand Down
1 change: 1 addition & 0 deletions src/detail/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* see <https://www.lsstcorp.org/LegalNotices/>.
*/
#include "astshim/detail/utils.h"
#include "astshim/Object.h"

namespace ast {
namespace detail {
Expand Down

0 comments on commit 6111211

Please sign in to comment.